#ifndef _LCD_TWI_H_ #define _LCD_TWI_H_ #ifndef F_CPU #error "F_CPU not defined!" #endif #include #include #include #define LCD_RS 0x01 #define LCD_RW 0x02 #define LCD_E 0x04 #define LCD_LED 0x08 #define LCD_CLR (1 << 0x00) #define LCD_RET (1 << 0x01) #define LCD_DIR (1 << 0x02) #define LCD_DIR_S (1 << 0x00) #define LCD_DIR_ID (1 << 0x01) #define LCD_ONOFF (1 << 0x03) #define LCD_ONOFF_B (1 << 0x00) #define LCD_ONOFF_C (1 << 0x01) #define LCD_ONOFF_D (1 << 0x02) #define LCD_SHIFT (1 << 0x04) #define LCD_SHIFT_RL (1 << 0x02) #define LCD_SHIFT_SC (1 << 0x03) #define LCD_MODEPWR ((1 << 0x04) | (3 << 0x00)) #define LCD_MODEPWR_PWR (1 << 0x02) #define LCD_MODEPWR_GC (1 << 0x03) #define LCD_WIDTH (1 << 0x05) #define LCD_WIDTH_FT0 (1 << 0x00) #define LCD_WIDTH_FT1 (1 << 0x01) #define LCD_WIDTH_F (1 << 0x02) #define LCD_WIDTH_N (1 << 0x03) #define LCD_WIDTH_DL (1 << 0x04) #define LCD_CGRAM (1 << 0x06) #define LCD_DDRAM (1 << 0x07) #define LCDI2CADDR 0x4E enum { SYM_NULL, SYM_DEGREE, SYM_TCOUPLE, SYM_DIODE, SYM_RES, SYM_MOSFET, SYM_OPEN, SYM_SHORT }; void I2C_SendByte(uint8_t); void LCD_SendData(uint8_t); void LCD_SendCmd(uint8_t); void LCD_SetPos(uint8_t, uint8_t); void LCD_Init(void); void LoadSymbol(void); #endif