From 7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 3 Nov 2018 10:51:23 +1000 Subject: For all source files update integer types to the new gI8 etc type names --- demos/tools/touch_driver_test/main.c | 2 +- demos/tools/uGFXnetDisplay/main.c | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'demos/tools') diff --git a/demos/tools/touch_driver_test/main.c b/demos/tools/touch_driver_test/main.c index 2a1e6486..ec570b1d 100644 --- a/demos/tools/touch_driver_test/main.c +++ b/demos/tools/touch_driver_test/main.c @@ -96,7 +96,7 @@ int main(void) { GMouse * m; GMouseVMT * vmt; GMouseJitter * pjit; - uint32_t calerr; + gU32 calerr; gfxInit(); // Initialize the display diff --git a/demos/tools/uGFXnetDisplay/main.c b/demos/tools/uGFXnetDisplay/main.c index a4ba943f..4eba5f78 100644 --- a/demos/tools/uGFXnetDisplay/main.c +++ b/demos/tools/uGFXnetDisplay/main.c @@ -134,15 +134,15 @@ static gFont font; /** * Get a whole packet of data. - * Len is specified in the number of uint16_t's we want as our protocol only talks uint16_t's. + * Len is specified in the number of gU16's we want as our protocol only talks gU16's. * If the connection closes before we get all the data - the call returns gFalse. */ -static gBool getpkt(uint16_t *pkt, int len) { +static gBool getpkt(gU16 *pkt, int len) { int got; int have; // Get the packet of data - len *= sizeof(uint16_t); + len *= sizeof(gU16); have = 0; while(len && (got = recv(netfd, ((char *)pkt)+have, len, 0)) > 0) { have += got; @@ -151,7 +151,7 @@ static gBool getpkt(uint16_t *pkt, int len) { if (len) return gFalse; - // Convert each uint16_t to host order + // Convert each gU16 to host order for(got = 0, have /= 2; got < have; got++) pkt[got] = ntohs(pkt[got]); @@ -160,19 +160,19 @@ static gBool getpkt(uint16_t *pkt, int len) { /** * Send a whole packet of data. - * Len is specified in the number of uint16_t's we want to send as our protocol only talks uint16_t's. + * Len is specified in the number of gU16's we want to send as our protocol only talks gU16's. * Note that contents of the packet are modified to ensure it will cross the wire in the correct format. * If the connection closes before we send all the data - the call returns gFalse. */ -static gBool sendpkt(uint16_t *pkt, int len) { +static gBool sendpkt(gU16 *pkt, int len) { int i; - // Convert each uint16_t to network order + // Convert each gU16 to network order for(i = 0; i < len; i++) pkt[i] = htons(pkt[i]); // Send it - len *= sizeof(uint16_t); + len *= sizeof(gU16); return send(netfd, (const char *)pkt, len, 0) == len; } @@ -185,8 +185,8 @@ static gBool sendpkt(uint16_t *pkt, int len) { static DECLARE_THREAD_STACK(waNetThread, 512); static DECLARE_THREAD_FUNCTION(NetThread, param) { GEventMouse *pem; - uint16_t cmd[2]; - uint16_t lbuttons; + gU16 cmd[2]; + gU16 lbuttons; gCoord lx, ly; (void) param; @@ -327,7 +327,7 @@ static SOCKET_TYPE doConnect(proto_args) { * There are two prototypes - one for systems with a command line and one for embedded systems without one. */ int main(proto_args) { - uint16_t cmd[5]; + gU16 cmd[5]; unsigned cnt; @@ -403,13 +403,13 @@ int main(proto_args) { gdispControl(cmd[0], (void *)(unsigned)cmd[1]); switch(cmd[0]) { case GDISP_CONTROL_ORIENTATION: - cmd[1] = (uint16_t)gdispGetOrientation() == cmd[1] ? 1 : 0; + cmd[1] = (gU16)gdispGetOrientation() == cmd[1] ? 1 : 0; break; case GDISP_CONTROL_POWER: - cmd[1] = (uint16_t)gdispGetPowerMode() == cmd[1] ? 1 : 0; + cmd[1] = (gU16)gdispGetPowerMode() == cmd[1] ? 1 : 0; break; case GDISP_CONTROL_BACKLIGHT: - cmd[1] = (uint16_t)gdispGetBacklight() == cmd[1] ? 1 : 0; + cmd[1] = (gU16)gdispGetBacklight() == cmd[1] ? 1 : 0; break; default: cmd[1] = 0; -- cgit v1.2.3