diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-06-23 13:02:07 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-06-23 13:02:07 +1000 |
commit | 41271d632b74f5cf47c30d3b699eb6b2786f2136 (patch) | |
tree | 78bcb729c6d6177ca598f28908fefd186c50e9b6 /drivers/gdisp/ED060SC4 | |
parent | 3b97fb798e96514057bcf17263c1e5dbdcd7da26 (diff) | |
download | uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.gz uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.bz2 uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.zip |
Added new type definitions - moving towards V3.0
Diffstat (limited to 'drivers/gdisp/ED060SC4')
-rw-r--r-- | drivers/gdisp/ED060SC4/board_ED060SC4_example.h | 20 | ||||
-rw-r--r-- | drivers/gdisp/ED060SC4/board_ED060SC4_template.h | 20 | ||||
-rw-r--r-- | drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c | 98 |
3 files changed, 69 insertions, 69 deletions
diff --git a/drivers/gdisp/ED060SC4/board_ED060SC4_example.h b/drivers/gdisp/ED060SC4/board_ED060SC4_example.h index 6cda606b..95823edc 100644 --- a/drivers/gdisp/ED060SC4/board_ED060SC4_example.h +++ b/drivers/gdisp/ED060SC4/board_ED060SC4_example.h @@ -69,38 +69,38 @@ static void eink_delay(int us) } /* Turn the E-ink panel Vdd supply (+3.3V) on or off. */ -static GFXINLINE void setpower_vdd(bool_t on) { +static GFXINLINE void setpower_vdd(gBool on) { palWritePad(GPIOB, GPIOB_SMPS_CTRL, !on); palWritePad(GPIOA, GPIOA_EINK_VDD, on); } /* Turn the E-ink panel negative supplies (-15V, -20V) on or off. */ -static GFXINLINE void setpower_vneg(bool_t on) { +static GFXINLINE void setpower_vneg(gBool on) { palWritePad(GPIOA, GPIOA_VNEG_CTRL, on); } /* Turn the E-ink panel positive supplies (-15V, -20V) on or off. */ -static GFXINLINE void setpower_vpos(bool_t on) { +static GFXINLINE void setpower_vpos(gBool on) { palWritePad(GPIOA, GPIOA_VPOS_CTRL, on); } /* Set the state of the LE (source driver Latch Enable) pin. */ -static GFXINLINE void setpin_le(bool_t on) { +static GFXINLINE void setpin_le(gBool on) { palWritePad(GPIOB, GPIOB_EINK_LE, on); } /* Set the state of the OE (source driver Output Enable) pin. */ -static GFXINLINE void setpin_oe(bool_t on) { +static GFXINLINE void setpin_oe(gBool on) { palWritePad(GPIOB, GPIOB_EINK_OE, on); } /* Set the state of the CL (source driver Clock) pin. */ -static GFXINLINE void setpin_cl(bool_t on) { +static GFXINLINE void setpin_cl(gBool on) { palWritePad(GPIOB, GPIOB_EINK_CL, on); } /* Set the state of the SPH (source driver Start Pulse Horizontal) pin. */ -static GFXINLINE void setpin_sph(bool_t on) { +static GFXINLINE void setpin_sph(gBool on) { palWritePad(GPIOB, GPIOB_EINK_SPH, on); } @@ -110,17 +110,17 @@ static GFXINLINE void setpins_data(uint8_t value) { } /* Set the state of the CKV (gate driver Clock Vertical) pin. */ -static GFXINLINE void setpin_ckv(bool_t on) { +static GFXINLINE void setpin_ckv(gBool on) { palWritePad(GPIOB, GPIOB_EINK_CKV, on); } /* Set the state of the GMODE (gate driver Gate Mode) pin. */ -static GFXINLINE void setpin_gmode(bool_t on) { +static GFXINLINE void setpin_gmode(gBool on) { palWritePad(GPIOC, GPIOC_EINK_GMODE, on); } /* Set the state of the SPV (gate driver Start Pulse Vertical) pin. */ -static GFXINLINE void setpin_spv(bool_t on) { +static GFXINLINE void setpin_spv(gBool on) { palWritePad(GPIOB, GPIOB_EINK_SPV, on); } diff --git a/drivers/gdisp/ED060SC4/board_ED060SC4_template.h b/drivers/gdisp/ED060SC4/board_ED060SC4_template.h index ad261b44..71c9caae 100644 --- a/drivers/gdisp/ED060SC4/board_ED060SC4_template.h +++ b/drivers/gdisp/ED060SC4/board_ED060SC4_template.h @@ -54,37 +54,37 @@ static void eink_delay(int us) { (void) us; } -static GFXINLINE void setpower_vdd(GDisplay *g, bool_t on) { +static GFXINLINE void setpower_vdd(GDisplay *g, gBool on) { (void) g; (void) on; } -static GFXINLINE void setpower_vneg(GDisplay *g, bool_t on) { +static GFXINLINE void setpower_vneg(GDisplay *g, gBool on) { (void) g; (void) on; } -static GFXINLINE void setpower_vpos(GDisplay *g, bool_t on) { +static GFXINLINE void setpower_vpos(GDisplay *g, gBool on) { (void) g; (void) on; } -static GFXINLINE void setpin_le(GDisplay *g, bool_t on) { +static GFXINLINE void setpin_le(GDisplay *g, gBool on) { (void) g; (void) on; } -static GFXINLINE void setpin_oe(GDisplay *g, bool_t on) { +static GFXINLINE void setpin_oe(GDisplay *g, gBool on) { (void) g; (void) on; } -static GFXINLINE void setpin_cl(GDisplay *g, bool_t on) { +static GFXINLINE void setpin_cl(GDisplay *g, gBool on) { (void) g; (void) on; } -static GFXINLINE void setpin_sph(GDisplay *g, bool_t on) { +static GFXINLINE void setpin_sph(GDisplay *g, gBool on) { (void) g; (void) on; } @@ -94,17 +94,17 @@ static GFXINLINE void setpins_data(GDisplay *g, uint8_t value) { (void) value; } -static GFXINLINE void setpin_ckv(GDisplay *g, bool_t on) { +static GFXINLINE void setpin_ckv(GDisplay *g, gBool on) { (void) g; (void) on; } -static GFXINLINE void setpin_gmode(GDisplay *g, bool_t on) { +static GFXINLINE void setpin_gmode(GDisplay *g, gBool on) { (void) g; (void) on; } -static GFXINLINE void setpin_spv(GDisplay *g, bool_t on) { +static GFXINLINE void setpin_spv(GDisplay *g, gBool on) { (void) g; (void) on; } diff --git a/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c b/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c index 3272ca0a..a745ab86 100644 --- a/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c +++ b/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c @@ -109,9 +109,9 @@ static GFXINLINE void clockdelay(void) /* Fast vertical clock pulse for gate driver, used during initializations */ static void vclock_quick(GDisplay *g) { - setpin_ckv(g, TRUE); + setpin_ckv(g, gTrue); eink_delay(1); - setpin_ckv(g, FALSE); + setpin_ckv(g, gFalse); eink_delay(4); } @@ -119,9 +119,9 @@ static void vclock_quick(GDisplay *g) static void hclock(GDisplay *g) { clockdelay(); - setpin_cl(g, TRUE); + setpin_cl(g, gTrue); clockdelay(); - setpin_cl(g, FALSE); + setpin_cl(g, gFalse); } /* Start a new vertical gate driver scan from top. @@ -131,11 +131,11 @@ static void hclock(GDisplay *g) */ static void vscan_start(GDisplay *g) { - setpin_gmode(g, TRUE); + setpin_gmode(g, gTrue); vclock_quick(g); - setpin_spv(g, FALSE); + setpin_spv(g, gFalse); vclock_quick(g); - setpin_spv(g, TRUE); + setpin_spv(g, gTrue); vclock_quick(g); } @@ -145,11 +145,11 @@ static void vscan_start(GDisplay *g) */ static void vscan_write(GDisplay *g) { - setpin_ckv(g, TRUE); - setpin_oe(g, TRUE); + setpin_ckv(g, gTrue); + setpin_oe(g, gTrue); eink_delay(5); - setpin_oe(g, FALSE); - setpin_ckv(g, FALSE); + setpin_oe(g, gFalse); + setpin_ckv(g, gFalse); eink_delay(200); } @@ -158,9 +158,9 @@ static void vscan_write(GDisplay *g) */ static void vscan_bulkwrite(GDisplay *g) { - setpin_ckv(g, TRUE); + setpin_ckv(g, gTrue); eink_delay(20); - setpin_ckv(g, FALSE); + setpin_ckv(g, gFalse); eink_delay(200); } @@ -169,9 +169,9 @@ static void vscan_bulkwrite(GDisplay *g) */ static void vscan_skip(GDisplay *g) { - setpin_ckv(g, TRUE); + setpin_ckv(g, gTrue); eink_delay(1); - setpin_ckv(g, FALSE); + setpin_ckv(g, gFalse); eink_delay(100); } @@ -180,7 +180,7 @@ static void vscan_skip(GDisplay *g) */ static void vscan_stop(GDisplay *g) { - setpin_gmode(g, FALSE); + setpin_gmode(g, gFalse); vclock_quick(g); vclock_quick(g); vclock_quick(g); @@ -192,11 +192,11 @@ static void vscan_stop(GDisplay *g) static void hscan_start(GDisplay *g) { /* Disable latching and output enable while we are modifying the row. */ - setpin_le(g, FALSE); - setpin_oe(g, FALSE); + setpin_le(g, gFalse); + setpin_oe(g, gFalse); /* The start pulse should remain low for the duration of the row. */ - setpin_sph(g, FALSE); + setpin_sph(g, gFalse); } /* Write data to the horizontal row. */ @@ -217,13 +217,13 @@ static void hscan_write(GDisplay *g, const uint8_t *data, int count) static void hscan_stop(GDisplay *g) { /* End the scan */ - setpin_sph(g, TRUE); + setpin_sph(g, gTrue); hclock(g); /* Latch the new data */ - setpin_le(g, TRUE); + setpin_le(g, gTrue); clockdelay(); - setpin_le(g, FALSE); + setpin_le(g, gFalse); } /* Turn on the power to the E-Ink panel, observing proper power sequencing. */ @@ -232,25 +232,25 @@ static void power_on(GDisplay *g) unsigned i; /* First the digital power supply and signal levels. */ - setpower_vdd(g, TRUE); - setpin_le(g, FALSE); - setpin_oe(g, FALSE); - setpin_cl(g, FALSE); - setpin_sph(g, TRUE); + setpower_vdd(g, gTrue); + setpin_le(g, gFalse); + setpin_oe(g, gFalse); + setpin_cl(g, gFalse); + setpin_sph(g, gTrue); setpins_data(g, 0); - setpin_ckv(g, FALSE); - setpin_gmode(g, FALSE); - setpin_spv(g, TRUE); + setpin_ckv(g, gFalse); + setpin_gmode(g, gFalse); + setpin_spv(g, gTrue); /* Min. 100 microsecond delay after digital supply */ gfxSleepMicroseconds(100); /* Then negative voltages and min. 1000 microsecond delay. */ - setpower_vneg(g, TRUE); + setpower_vneg(g, gTrue); gfxSleepMicroseconds(1000); /* Finally the positive voltages. */ - setpower_vpos(g, TRUE); + setpower_vpos(g, gTrue); /* Clear the vscan shift register */ vscan_start(g); @@ -263,22 +263,22 @@ static void power_on(GDisplay *g) static void power_off(GDisplay *g) { /* First the high voltages */ - setpower_vpos(g, FALSE); - setpower_vneg(g, FALSE); + setpower_vpos(g, gFalse); + setpower_vneg(g, gFalse); /* Wait for any capacitors to drain */ gfxSleepMilliseconds(100); /* Then put all signals and digital supply to ground. */ - setpin_le(g, FALSE); - setpin_oe(g, FALSE); - setpin_cl(g, FALSE); - setpin_sph(g, FALSE); + setpin_le(g, gFalse); + setpin_oe(g, gFalse); + setpin_cl(g, gFalse); + setpin_sph(g, gFalse); setpins_data(g, 0); - setpin_ckv(g, FALSE); - setpin_gmode(g, FALSE); - setpin_spv(g, FALSE); - setpower_vdd(g, FALSE); + setpin_ckv(g, gFalse); + setpin_gmode(g, gFalse); + setpin_spv(g, gFalse); + setpower_vdd(g, gFalse); } /* ==================================== @@ -332,17 +332,17 @@ typedef struct drvPriv { } drvPriv; /* Check if the row contains any allocated blocks. */ -static bool_t blocks_on_row(GDisplay *g, unsigned by) +static gBool blocks_on_row(GDisplay *g, unsigned by) { unsigned bx; for (bx = 0; bx < BLOCKS_X; bx++) { if (PRIV(g)->g_blockmap[by][bx] != 0) { - return TRUE; + return gTrue; } } - return FALSE; + return gFalse; } /* Write out a block row. */ @@ -432,7 +432,7 @@ static block_t *alloc_buffer(GDisplay *g, unsigned bx, unsigned by) /* Driver exported functions. */ /*===========================================================================*/ -LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { +LLDSPEC gBool gdisp_lld_init(GDisplay *g) { g->priv = gfxAlloc(sizeof(drvPriv)); init_board(g); @@ -452,7 +452,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { g->g.Powermode = powerOn; g->g.Backlight = 100; g->g.Contrast = 100; - return TRUE; + return gTrue; } #if GDISP_HARDWARE_FLUSH @@ -593,12 +593,12 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { } hscan_stop(g); - setpin_oe(g, TRUE); + setpin_oe(g, gTrue); vscan_start(g); for (y = 0; y < GDISP_SCREEN_HEIGHT; y++) vscan_bulkwrite(g); vscan_stop(g); - setpin_oe(g, FALSE); + setpin_oe(g, gFalse); } void gdisp_lld_clear(GDisplay *g) { |