/** * \file * * * \brief LM044L type LCD hardware module (impl.) * * \author Bernie Innocenti * \author Stefano Fedrigo */ #include "lcd_hd44.h" #include "hw/hw_lcd_hd44.h" #include #include #warning TODO:Refactor this test to comply whit BeRTOS test policy. #if UNIT_TEST void lcd_hw_test(void) { lcd_regWrite(LCD_CMD_SET_DDRAMADDR | 3); timer_delay(1); kprintf("3 -> %02X\n", lcd_regRead()); timer_delay(1); for (int i = 0; i < 10; i++) { lcd_dataWrite('c'); timer_delay(1); kprintf("addr = %02X\n", lcd_regRead()); timer_delay(1); } lcd_regWrite(LCD_CMD_SET_DDRAMADDR | 0x4a); timer_delay(1); kprintf("4A -> %02X\n", lcd_regRead()); timer_delay(1); lcd_regWrite(LCD_CMD_SET_DDRAMADDR | 0x52); timer_delay(1); kprintf("52 -> %02X\n", lcd_regRead()); timer_delay(1); lcd_regWrite(LCD_CMD_SET_DDRAMADDR | 0x1F); timer_delay(1); kprintf("1F -> %02X\n", lcd_regRead()); timer_delay(1); } #include #include int main(void) { lcd_hw_test(); for(;;) { } return 0; } #endif