SSD1289 fix
This commit is contained in:
parent
92ed50dbf0
commit
b77d45350f
2 changed files with 6 additions and 5 deletions
|
@ -368,7 +368,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
|
||||||
* @note Optional.
|
* @note Optional.
|
||||||
* @note If x,y is off the screen, the result is undefined.
|
* @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
|
* @notapi
|
||||||
*/
|
*/
|
||||||
|
@ -386,6 +386,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
|
||||||
color = read_data();
|
color = read_data();
|
||||||
stream_stop();
|
stream_stop();
|
||||||
release_bus();
|
release_bus();
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -139,16 +139,16 @@ static __inline uint16_t read_data(void) {
|
||||||
uint16_t value;
|
uint16_t value;
|
||||||
|
|
||||||
// change pin mode to digital input
|
// change pin mode to digital input
|
||||||
GDISP_DATA_PORT->CRH = 0x44444444;
|
palSetGroupMode(GDISP_DATA_PORT, PAL_WHOLE_PORT, 0, PAL_MODE_INPUT);
|
||||||
GDISP_DATA_PORT->CRL = 0x44444444;
|
|
||||||
|
|
||||||
CLR_RD;
|
CLR_RD;
|
||||||
value = palReadPort(GDISP_DATA_PORT);
|
value = palReadPort(GDISP_DATA_PORT);
|
||||||
|
value = palReadPort(GDISP_DATA_PORT);
|
||||||
SET_RD;
|
SET_RD;
|
||||||
|
|
||||||
// change pin mode back to digital output
|
// change pin mode back to digital output
|
||||||
GDISP_DATA_PORT->CRH = 0x33333333;
|
palSetGroupMode(GDISP_DATA_PORT, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
GDISP_DATA_PORT->CRL = 0x33333333;
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue