aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h b/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h
index 185dac8a..8d953aa8 100644
--- a/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h
+++ b/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h
@@ -29,14 +29,14 @@
#ifndef _GDISP_LLD_BOARD_H
#define _GDISP_LLD_BOARD_H
-#define SET_CS palSetPad(GDISP_CMD_PORT, GDISP_CS);
-#define CLR_CS palClearPad(GDISP_CMD_PORT, GDISP_CS);
-#define SET_RS palSetPad(GDISP_CMD_PORT, GDISP_RS);
-#define CLR_RS palClearPad(GDISP_CMD_PORT, GDISP_RS);
-#define SET_WR palSetPad(GDISP_CMD_PORT, GDISP_WR);
-#define CLR_WR palClearPad(GDISP_CMD_PORT, GDISP_WR);
-#define SET_RD palSetPad(GDISP_CMD_PORT, GDISP_RD);
-#define CLR_RD palClearPad(GDISP_CMD_PORT, GDISP_RD);
+#define SET_CS palSetPad(GPIOD, 12);
+#define CLR_CS palClearPad(GPIOD, 12);
+#define SET_RS palSetPad(GPIOD, 13);
+#define CLR_RS palClearPad(GPIOD, 13);
+#define SET_WR palSetPad(GPIOD, 14);
+#define CLR_WR palClearPad(GPIOD, 14);
+#define SET_RD palSetPad(GPIOD, 15);
+#define CLR_RD palClearPad(GPIOD, 15);
/**
* @brief Initialise the board for the display.
@@ -45,11 +45,11 @@
* @notapi
*/
static __inline void init_board(void) {
- palSetGroupMode(GDISP_DATA_PORT, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GDISP_CMD_PORT, GDISP_CS, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GDISP_CMD_PORT, GDISP_RS, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GDISP_CMD_PORT, GDISP_WR, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GDISP_CMD_PORT, GDISP_RD, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetGroupMode(GPIOE, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOD, 12, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOD, 13, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOD, 14, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOD, 15, PAL_MODE_OUTPUT_PUSHPULL);
// Configure the pins to a well know state
SET_RS;
@@ -109,7 +109,7 @@ static __inline void release_bus(void) {
* @notapi
*/
static __inline void write_index(uint16_t index) {
- palWritePort(GDISP_DATA_PORT, index);
+ palWritePort(GPIOE, index);
CLR_RS; CLR_WR; SET_WR; SET_RS;
}
@@ -121,7 +121,7 @@ static __inline void write_index(uint16_t index) {
* @notapi
*/
static __inline void write_data(uint16_t data) {
- palWritePort(GDISP_DATA_PORT, data);
+ palWritePort(GPIOE, data);
CLR_WR; SET_WR;
}
@@ -139,15 +139,15 @@ static __inline uint16_t read_data(void) {
uint16_t value;
// change pin mode to digital input
- palSetGroupMode(GDISP_DATA_PORT, PAL_WHOLE_PORT, 0, PAL_MODE_INPUT);
+ palSetGroupMode(GPIOE, PAL_WHOLE_PORT, 0, PAL_MODE_INPUT);
CLR_RD;
- value = palReadPort(GDISP_DATA_PORT);
- value = palReadPort(GDISP_DATA_PORT);
+ value = palReadPort(GPIOE);
+ value = palReadPort(GPIOE);
SET_RD;
// change pin mode back to digital output
- palSetGroupMode(GDISP_DATA_PORT, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetGroupMode(GPIOE, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
return value;
}