From a278e1c11377bb01e080d0f2ac2012e34737b651 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Wed, 16 Jan 2013 10:37:56 +0100 Subject: removed internal TDISP_LLD() macro --- drivers/tdisp/HD44780/tdisp_lld.c | 24 ++++++++++++------------ drivers/tdisp/HD44780/tdisp_lld_config.h | 1 - 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'drivers/tdisp') diff --git a/drivers/tdisp/HD44780/tdisp_lld.c b/drivers/tdisp/HD44780/tdisp_lld.c index 2c28d8a3..29efbf92 100644 --- a/drivers/tdisp/HD44780/tdisp_lld.c +++ b/drivers/tdisp/HD44780/tdisp_lld.c @@ -43,7 +43,7 @@ static void _writeData(uint8_t data) { chThdSleepMicroseconds(5); } -void TDISP_LLD(write_cmd)(uint8_t data) { +void tdisp_lld_write_cmd(uint8_t data) { setpin_rs(FALSE); setpin_rw(FALSE); @@ -53,7 +53,7 @@ void TDISP_LLD(write_cmd)(uint8_t data) { _writeData(data); } -void TDISP_LLD(write_data)(uint8_t data) { +void tdisp_lld_write_data(uint8_t data) { setpin_rs(TRUE); setpin_rw(FALSE); @@ -63,47 +63,47 @@ void TDISP_LLD(write_data)(uint8_t data) { _writeData(data); } -bool_t TDISP_LLD(init)(void) { +bool_t tdisp_lld_init(void) { /* initialise MCU hardware */ init_board(); /* wait some time */ chThdSleepMilliseconds(50); - TDISP_LLD(write_cmd)(0x38); + tdisp_lld_write_cmd(0x38); chThdSleepMilliseconds(64); - TDISP_LLD(write_cmd)(0x0f); + tdisp_lld_write_cmd(0x0f); chThdSleepMicroseconds(50); - TDISP_LLD(write_cmd)(0x01); + tdisp_lld_write_cmd(0x01); chThdSleepMilliseconds(5); - TDISP_LLD(write_cmd)(0x06); + tdisp_lld_write_cmd(0x06); chThdSleepMicroseconds(50); return TRUE; } -void TDISP_LLD(set_cursor)(coord_t col, coord_t row) { +void tdisp_lld_set_cursor(coord_t col, coord_t row) { uint8_t row_offsets[] = { 0x00, 0x40, 0x14, 0x54 }; if(row >= TDISP_ROWS) row = TDISP_ROWS - 1; - TDISP_LLD(write_cmd)(0x80 | (col + row_offsets[row])); + tdisp_lld_write_cmd(0x80 | (col + row_offsets[row])); } -void TDISP_LLD(create_char)(uint8_t address, char *charmap) { +void tdisp_lld_create_char(uint8_t address, char *charmap) { uint8_t i; /* make sure we don't write somewhere we're not supposed to */ address &= TDISP_MAX_CUSTOM_CHARS; - TDISP_LLD(write_cmd)(0x40 | (address << 3)); + tdisp_lld_write_cmd(0x40 | (address << 3)); for(i = 0; i < 8; i++) { - TDISP_LLD(write_data)(charmap[i]); + tdisp_lld_write_data(charmap[i]); } } diff --git a/drivers/tdisp/HD44780/tdisp_lld_config.h b/drivers/tdisp/HD44780/tdisp_lld_config.h index 00032eaa..3b37cd70 100644 --- a/drivers/tdisp/HD44780/tdisp_lld_config.h +++ b/drivers/tdisp/HD44780/tdisp_lld_config.h @@ -36,7 +36,6 @@ /*===========================================================================*/ #define TDISP_DRIVER_NAME "HD44780" -#define TDISP_LLD(x) tdisp_lld_##x##_HD44780 #define TDISP_MAX_CUSTOM_CHARS 0x07 -- cgit v1.2.3