#include <stdbool.h>
#include <inttypes.h>
+#warning TODO:Refactor this module. Split code to hw file.
+
/* Configuration sanity checks */
#if !defined(CONFIG_LCD_SOFTINT_REFRESH) || (CONFIG_LCD_SOFTINT_REFRESH != 0 && CONFIG_LCD_SOFTINT_REFRESH != 1)
#error CONFIG_LCD_SOFTINT_REFRESH must be defined to either 0 or 1
return data;
}
-
static inline void lcd_32122_write(uint8_t c, uint8_t chip)
{
WAIT_LCD;
//LCD_DB_IN;
}
-
-/**
- * Set LCD contrast PWM.
- */
-void lcd_32122_setPwm(int duty)
-{
- ASSERT(duty >= LCD_MIN_PWM);
- ASSERT(duty <= LCD_MAX_PWM);
-
- OCR3C = duty;
-}
-
-
static void lcd_32122_clear(void)
{
uint8_t page, j;
}
}
-/**
- * Update the LCD display with data from the provided bitmap.
- */
-void lcd_32122_blitBitmap(Bitmap *bm)
-{
- MOD_CHECK(lcd);
- lcd_32122_writeRaster(bm->raster);
-}
-
-
#if CONFIG_LCD_SOFTINT_REFRESH
static void lcd_32122_refreshSoftint(void)
#endif /* CONFIG_LCD_SOFTINT_REFRESH */
+/**
+ * Set LCD contrast PWM.
+ */
+void lcd_32122_setPwm(int duty)
+{
+ ASSERT(duty >= LCD_MIN_PWM);
+ ASSERT(duty <= LCD_MAX_PWM);
+
+ OCR3C = duty;
+}
+
+/**
+ * Update the LCD display with data from the provided bitmap.
+ */
+void lcd_32122_blitBitmap(Bitmap *bm)
+{
+ MOD_CHECK(lcd);
+ lcd_32122_writeRaster(bm->raster);
+}
+
/**
* Initialize LCD subsystem.
IRQ_RESTORE(flags);
lcd_32122_clear();
- lcd_32122_setpwm(LCD_DEF_PWM);
+ lcd_32122_setPwm(LCD_DEF_PWM);
gfx_bitmapInit(&lcd_bitmap, lcd_raster, LCD_WIDTH, LCD_HEIGHT);
gfx_bitmapClear(&lcd_bitmap);
MOD_INIT(lcd);
}
+