From 41271d632b74f5cf47c30d3b699eb6b2786f2136 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 23 Jun 2018 13:02:07 +1000 Subject: Added new type definitions - moving towards V3.0 --- drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802.c | 16 ++++++++-------- .../touch/MAX11802/gmouse_lld_MAX11802_board_template.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/ginput/touch/MAX11802') diff --git a/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802.c b/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802.c index 8976cceb..f2222898 100644 --- a/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802.c +++ b/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802.c @@ -27,7 +27,7 @@ #define Z_MIN 0 #define Z_MAX 1 -static bool_t MouseInit(GMouse* m, unsigned driverinstance) +static gBool MouseInit(GMouse* m, unsigned driverinstance) { const uint8_t *p; @@ -46,7 +46,7 @@ static bool_t MouseInit(GMouse* m, unsigned driverinstance) }; if (!init_board(m, driverinstance)) - return FALSE; + return gFalse; aquire_bus(m); for (p = commandList; p < commandList+sizeof(commandList); p += 2) @@ -60,15 +60,15 @@ static bool_t MouseInit(GMouse* m, unsigned driverinstance) aquire_bus(m); if (write_command(m, MAX11802_CMD_MODE_RD, 0) != MAX11802_MODE) { release_bus(m); - return FALSE; + return gFalse; } release_bus(m); - return TRUE; + return gTrue; } -static bool_t read_xyz(GMouse* m, GMouseReading* pdr) +static gBool read_xyz(GMouse* m, GMouseReading* pdr) { uint8_t readyCount; uint8_t notReadyCount; @@ -126,7 +126,7 @@ static bool_t read_xyz(GMouse* m, GMouseReading* pdr) // Has it been too long? If so give up if (++notReadyCount >= 5) { - return FALSE; + return gFalse; } // Give up the time slice to someone else and then try again @@ -149,7 +149,7 @@ static bool_t read_xyz(GMouse* m, GMouseReading* pdr) // Was there a valid touch? if (((pdr->x | pdr->y) & 0x03) != 0x0) { pdr->z = Z_MIN; - return TRUE; + return gTrue; } // Strip the tags (we need to take care because coord_t is signed - and sign bit gets extended on shift!) @@ -157,7 +157,7 @@ static bool_t read_xyz(GMouse* m, GMouseReading* pdr) pdr->y = (uint16_t)(pdr->y) >> 4; pdr->z = Z_MAX; - return TRUE; + return gTrue; } const GMouseVMT const GMOUSE_DRIVER_VMT[1] = {{ diff --git a/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h b/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h index e5339815..cf663cb0 100644 --- a/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h +++ b/drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h @@ -22,9 +22,9 @@ /** * Init the board * - * Returns TRUE on success, FALSE on failure + * Returns gTrue on success, gFalse on failure */ -static GFXINLINE bool_t init_board(GMouse* m, unsigned driverinstance) { +static GFXINLINE gBool init_board(GMouse* m, unsigned driverinstance) { } -- cgit v1.2.3