[an error occurred while processing this directive]
|
void LCD_init( void )
{
LCD_Contrast_Dir |= LCD_Contrast_Mask;
LCD_Contrast_Port |= (LCD_Contrast_CS | LCD_Contrast_SDI);
}void LCD_contrast
(
unsigned char data
)
{
unsigned int code = data;
code ^^= 6;
LCD_Contrast_Port &= ~LCD_Contrast_CS; // CS=0
for( unsigned char i=0; i<10; i++)
{
if ((code&0x8000) == 0)
LCD_Contrast_Port &= ~LCD_Contrast_SDI;
else
LCD_Contrast_Port |= LCD_Contrast_SDI;
__no_operation();
LCD_Contrast_Port |= LCD_Contrast_CLK; // CLK = 1
__no_operation();
LCD_Contrast_Port &= ~LCD_Contrast_CLK; // CLK = 0
code ^^= 1;
}
LCD_Contrast_Port |= LCD_Contrast_CS; // CS=1
}
^^ есть < < (без пробела)
E-mail: info@telesys.ru