aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2012-11-20 23:30:27 +0100
committerJoel Bodenmann <joel@unormal.org>2012-11-20 23:30:27 +0100
commitb77d45350f3d739c4f52ef53f02effa47e73fcc2 (patch)
treeeb3aaf06daa57d05e88ae955a7609292440f1b59 /drivers
parent92ed50dbf0a4bad1ef11d8892e13f0e2aa31a119 (diff)
downloaduGFX-b77d45350f3d739c4f52ef53f02effa47e73fcc2.tar.gz
uGFX-b77d45350f3d739c4f52ef53f02effa47e73fcc2.tar.bz2
uGFX-b77d45350f3d739c4f52ef53f02effa47e73fcc2.zip
SSD1289 fix
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gdisp/SSD1289/gdisp_lld.c3
-rw-r--r--drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h8
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gdisp/SSD1289/gdisp_lld.c b/drivers/gdisp/SSD1289/gdisp_lld.c
index 9b572568..3a770bc6 100644
--- a/drivers/gdisp/SSD1289/gdisp_lld.c
+++ b/drivers/gdisp/SSD1289/gdisp_lld.c
@@ -368,7 +368,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
* @note Optional.
* @note If x,y is off the screen, the result is undefined.
*
- * @param[in] x, y The start of the text
+ * @param[in] x, y The pixel to be read
*
* @notapi
*/
@@ -386,6 +386,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
color = read_data();
stream_stop();
release_bus();
+
return color;
}
#endif
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h b/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h
index 48be3cf7..185dac8a 100644
--- a/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h
+++ b/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h
@@ -139,16 +139,16 @@ static __inline uint16_t read_data(void) {
uint16_t value;
// change pin mode to digital input
- GDISP_DATA_PORT->CRH = 0x44444444;
- GDISP_DATA_PORT->CRL = 0x44444444;
+ palSetGroupMode(GDISP_DATA_PORT, PAL_WHOLE_PORT, 0, PAL_MODE_INPUT);
CLR_RD;
value = palReadPort(GDISP_DATA_PORT);
+ value = palReadPort(GDISP_DATA_PORT);
SET_RD;
// change pin mode back to digital output
- GDISP_DATA_PORT->CRH = 0x33333333;
- GDISP_DATA_PORT->CRL = 0x33333333;
+ palSetGroupMode(GDISP_DATA_PORT, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
+
return value;
}
#endif