aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-10-19 16:33:13 +1000
committerinmarket <andrewh@inmarket.com.au>2013-10-19 16:33:13 +1000
commitad416c32b3558b56c8462dbcadfe1c0520479a1f (patch)
tree947dc2810e77942884216f694f74ba6c12feb9f8 /drivers/gdisp
parente9895b5d14714683b1a98f8d24028d94e22b4bb5 (diff)
downloaduGFX-ad416c32b3558b56c8462dbcadfe1c0520479a1f.tar.gz
uGFX-ad416c32b3558b56c8462dbcadfe1c0520479a1f.tar.bz2
uGFX-ad416c32b3558b56c8462dbcadfe1c0520479a1f.zip
Small fix to the Nokia6610GE12 driver
Diffstat (limited to 'drivers/gdisp')
-rw-r--r--drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_olimexsam7ex256.h47
-rw-r--r--drivers/gdisp/Nokia6610GE12/gdisp_lld.c5
2 files changed, 9 insertions, 43 deletions
diff --git a/drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_olimexsam7ex256.h b/drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_olimexsam7ex256.h
index e0f8e988..7aad94d3 100644
--- a/drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_olimexsam7ex256.h
+++ b/drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_olimexsam7ex256.h
@@ -118,13 +118,10 @@ static inline void init_board(GDisplay *g) {
}
}
-/**
- * @brief Set or clear the lcd reset pin.
- *
- * @param[in] state TRUE = lcd in reset, FALSE = normal operation
- *
- * @notapi
- */
+static inline void post_init_board(GDisplay *g) {
+ (void) g;
+}
+
static inline void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
if (state)
@@ -133,16 +130,6 @@ static inline void setpin_reset(GDisplay *g, bool_t state) {
palSetPad(IOPORT1, PIOA_LCD_RESET);
}
-/**
- * @brief Set the lcd back-light level.
- * @note For now 0% turns the backlight off, anything else the backlight is on.
- * While the hardware supports PWM backlight control, we are not using it
- * yet.
- *
- * @param[in] percent 0 to 100%
- *
- * @notapi
- */
static inline void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
@@ -170,33 +157,14 @@ static inline void set_backlight(GDisplay *g, uint8_t percent) {
}
}
-/**
- * @brief Take exclusive control of the bus
- *
- * @notapi
- */
static inline void acquire_bus(GDisplay *g) {
(void) g;
- /* Nothing to do for this board as the LCD is the only device on the SPI port */
}
-/**
- * @brief Release exclusive control of the bus
- *
- * @notapi
- */
static inline void release_bus(GDisplay *g) {
(void) g;
- // Nothing to do for this board as the LCD is the only device on the SPI port
}
-/**
- * @brief Send an 8 bit command to the lcd.
- *
- * @param[in] cmd The command to send
- *
- * @notapi
- */
static inline void write_index(GDisplay *g, uint16_t cmd) {
(void) g;
@@ -206,13 +174,6 @@ static inline void write_index(GDisplay *g, uint16_t cmd) {
pSPI->SPI_TDR = cmd & 0xFF;
}
-/**
- * @brief Send an 8 bit data to the lcd.
- *
- * @param[in] data The data to send
- *
- * @notapi
- */
static inline void write_data(GDisplay *g, uint16_t data) {
(void) g;
diff --git a/drivers/gdisp/Nokia6610GE12/gdisp_lld.c b/drivers/gdisp/Nokia6610GE12/gdisp_lld.c
index d190c91a..9aa5ac53 100644
--- a/drivers/gdisp/Nokia6610GE12/gdisp_lld.c
+++ b/drivers/gdisp/Nokia6610GE12/gdisp_lld.c
@@ -106,11 +106,16 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
delayms(20);
acquire_bus(g);
+
write_index(g, SLEEPOUT); // Sleep out
write_reg(g, COLMOD, 0x03); // Color Interface Pixel Format - 0x03 = 12 bits-per-pixel
write_reg(g, MADCTL, 0x00); // Memory access controller
write_reg(g, SETCON, 127*GDISP_INITIAL_CONTRAST/100-64); // Write contrast
delayms(20);
+
+ // Finish Init
+ post_init_board(g);
+
release_bus(g);
/* Turn on the back-light */