/*! * \brief Read byte from LCD controller. */ static unsigned int LcdReadByte(void) { outr(LCD_DATA_PIO_ID+PIO_ODR_OFF, LCD_DATA); LcdDelay(LCD_SHORT_DELAY); LCD_RW_SET(); LcdDelay(LCD_SHORT_DELAY); return (LcdReadNibble() << 4) | LcdReadNibble(); }
static INLINE u_char LcdReadByte(void) { u_char data; #if LCD_DATA_BITS == 0x0F data = LcdReadNibble(); data = data | (LcdReadNibble() << 4); #elif LCD_DATA_BITS == 0xF0 data = LcdReadNibble() >> 4; data |= LcdReadNibble(); #elif LCD_DATA_BITS == 0xFF data = LcdReadNibble(); #else #error "Bad definition of LCD_DATA_BITS" #endif return data; }