aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tdisp
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-01-16 10:37:56 +0100
committerJoel Bodenmann <joel@unormal.org>2013-01-16 10:37:56 +0100
commita278e1c11377bb01e080d0f2ac2012e34737b651 (patch)
tree8f5a33a0a2338d451b8dd9cb402552e6a9f8caf3 /drivers/tdisp
parent1e4cb14188328df44d450467a5db2f3a6afe843b (diff)
downloaduGFX-a278e1c11377bb01e080d0f2ac2012e34737b651.tar.gz
uGFX-a278e1c11377bb01e080d0f2ac2012e34737b651.tar.bz2
uGFX-a278e1c11377bb01e080d0f2ac2012e34737b651.zip
removed internal TDISP_LLD() macro
Diffstat (limited to 'drivers/tdisp')
-rw-r--r--drivers/tdisp/HD44780/tdisp_lld.c24
-rw-r--r--drivers/tdisp/HD44780/tdisp_lld_config.h1
2 files changed, 12 insertions, 13 deletions
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