aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp/SSD1963/gdisp_lld.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-05-25 01:26:52 +1000
committerinmarket <andrewh@inmarket.com.au>2013-05-25 01:26:52 +1000
commit7fbfde42aabbcd30cffba2fba35158236c0a6c6c (patch)
treee85c90a4f21974b706315d64209021e0b2bde764 /drivers/gdisp/SSD1963/gdisp_lld.c
parent42006a67b5ccfd86f30d8a91cc474681c437eaf6 (diff)
downloaduGFX-7fbfde42aabbcd30cffba2fba35158236c0a6c6c.tar.gz
uGFX-7fbfde42aabbcd30cffba2fba35158236c0a6c6c.tar.bz2
uGFX-7fbfde42aabbcd30cffba2fba35158236c0a6c6c.zip
GOS module, for operating system independance
GMISC fast floating point trig GMISC fast fixed point trig
Diffstat (limited to 'drivers/gdisp/SSD1963/gdisp_lld.c')
-rw-r--r--drivers/gdisp/SSD1963/gdisp_lld.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/gdisp/SSD1963/gdisp_lld.c b/drivers/gdisp/SSD1963/gdisp_lld.c
index 8d12cf60..0a70406c 100644
--- a/drivers/gdisp/SSD1963/gdisp_lld.c
+++ b/drivers/gdisp/SSD1963/gdisp_lld.c
@@ -13,8 +13,6 @@
* @{
*/
-#include "ch.h"
-#include "hal.h"
#include "gfx.h"
#if GFX_USE_GDISP /*|| defined(__DOXYGEN__)*/
@@ -61,7 +59,7 @@ bool_t gdisp_lld_init(void) {
init_board();
write_index(SSD1963_SOFT_RESET);
- chThdSleepMicroseconds(100);
+ gfxSleepMicroseconds(100);
/* Driver PLL config */
write_index(SSD1963_SET_PLL_MN);
@@ -71,14 +69,14 @@ bool_t gdisp_lld_init(void) {
write_index(SSD1963_SET_PLL); // Enable PLL
write_data(0x01);
- chThdSleepMicroseconds(200);
+ gfxSleepMicroseconds(200);
write_index(SSD1963_SET_PLL); // Use PLL
write_data(0x03);
- chThdSleepMicroseconds(200);
+ gfxSleepMicroseconds(200);
write_index(SSD1963_SOFT_RESET);
- chThdSleepMicroseconds(100);
+ gfxSleepMicroseconds(100);
/* Screen size */
write_index(SSD1963_SET_GDISP_MODE);
@@ -362,13 +360,13 @@ void gdisp_lld_draw_pixel(coord_t x, coord_t y, color_t color) {
switch((gdisp_powermode_t)value) {
case powerOff:
write_index(SSD1963_EXIT_SLEEP_MODE); // leave sleep mode
- chThdSleepMilliseconds(5);
+ gfxSleepMilliseconds(5);
write_index(SSD1963_SET_DISPLAY_OFF);
write_index(SSD1963_SET_DEEP_SLEEP); // enter deep sleep mode
break;
case powerOn:
- read_reg(0x0000); chThdSleepMilliseconds(5); // 2x Dummy reads to wake up from deep sleep
- read_reg(0x0000); chThdSleepMilliseconds(5);
+ read_reg(0x0000); gfxSleepMilliseconds(5); // 2x Dummy reads to wake up from deep sleep
+ read_reg(0x0000); gfxSleepMilliseconds(5);
if (GDISP.Powermode != powerSleep)
gdisp_lld_init();
write_index(SSD1963_SET_DISPLAY_ON);
@@ -377,7 +375,7 @@ void gdisp_lld_draw_pixel(coord_t x, coord_t y, color_t color) {
case powerSleep:
write_index(SSD1963_SET_DISPLAY_OFF);
write_index(SSD1963_ENTER_SLEEP_MODE); // enter sleep mode
- chThdSleepMilliseconds(5);
+ gfxSleepMilliseconds(5);
break;
default:
return;