aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp')
-rw-r--r--drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
index 11b4b144..0e5381e5 100644
--- a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
+++ b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
@@ -117,10 +117,10 @@ static gBool uGFXInitDone;
typedef struct netPriv {
CLIENTFD netfd; // The current client
unsigned databytes; // How many bytes have been read
- uint16_t data[2]; // Buffer for storing data read.
+ gU16 data[2]; // Buffer for storing data read.
#if GINPUT_NEED_MOUSE
gCoord mousex, mousey;
- uint16_t mousebuttons;
+ gU16 mousebuttons;
GMouse * mouse;
#endif
} netPriv;
@@ -148,12 +148,12 @@ static void endcon(GDisplay *g) {
/**
* 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(CLIENTFD fd, uint16_t *pkt, int len) {
- // Convert each uint16_t to network order
+static gBool sendpkt(CLIENTFD fd, gU16 *pkt, int len) {
+ // Convert each gU16 to network order
#if GFX_CPU_ENDIAN == GFX_CPU_ENDIAN_LITTLE
{
int i;
@@ -164,8 +164,8 @@ static gBool sendpkt(CLIENTFD fd, uint16_t *pkt, int len) {
#endif
// Send it
- len *= sizeof(uint16_t);
- return fd->write((uint8_t *)pkt, len) == len;
+ len *= sizeof(gU16);
+ return fd->write((gU8 *)pkt, len) == len;
}
static void rxdata(GDisplay *g) {
@@ -197,7 +197,7 @@ static void rxdata(GDisplay *g) {
}
// Get the data
- if ((len = fd->read(((uint8_t *)priv->data)+priv->databytes, sizeof(priv->data)-priv->databytes, 0)) <= 0) {
+ if ((len = fd->read(((gU8 *)priv->data)+priv->databytes, sizeof(priv->data)-priv->databytes, 0)) <= 0) {
// Socket closed or in error state
MUTEX_EXIT;
endcon(g);
@@ -348,7 +348,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FLUSH
LLDSPEC void gdisp_lld_flush(GDisplay *g) {
netPriv * priv;
- uint16_t buf[1];
+ gU16 buf[1];
#if GDISP_DONT_WAIT_FOR_NET_DISPLAY
if (!(g->flags & GDISP_FLG_CONNECTED))
@@ -369,7 +369,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
netPriv * priv;
- uint16_t buf[4];
+ gU16 buf[4];
#if GDISP_DONT_WAIT_FOR_NET_DISPLAY
if (!(g->flags & GDISP_FLG_CONNECTED))
@@ -395,7 +395,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FILLS
LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
netPriv * priv;
- uint16_t buf[6];
+ gU16 buf[6];
#if GDISP_DONT_WAIT_FOR_NET_DISPLAY
if (!(g->flags & GDISP_FLG_CONNECTED))
@@ -422,7 +422,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
netPriv * priv;
gPixel * buffer;
- uint16_t buf[5];
+ gU16 buf[5];
gCoord x, y;
#if GDISP_DONT_WAIT_FOR_NET_DISPLAY
@@ -459,7 +459,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay *g) {
netPriv * priv;
- uint16_t buf[3];
+ gU16 buf[3];
gColor data;
#if GDISP_DONT_WAIT_FOR_NET_DISPLAY
@@ -492,7 +492,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_NEED_SCROLL && GDISP_HARDWARE_SCROLL
LLDSPEC void gdisp_lld_vertical_scroll(GDisplay *g) {
netPriv * priv;
- uint16_t buf[6];
+ gU16 buf[6];
#if GDISP_DONT_WAIT_FOR_NET_DISPLAY
if (!(g->flags & GDISP_FLG_CONNECTED))
@@ -518,7 +518,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
LLDSPEC void gdisp_lld_control(GDisplay *g) {
netPriv * priv;
- uint16_t buf[3];
+ gU16 buf[3];
gBool allgood;
#if GDISP_DONT_WAIT_FOR_NET_DISPLAY
@@ -540,9 +540,9 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
return;
break;
case GDISP_CONTROL_BACKLIGHT:
- if (g->g.Backlight == (uint16_t)(int)g->p.ptr)
+ if (g->g.Backlight == (gU16)(int)g->p.ptr)
return;
- if ((uint16_t)(int)g->p.ptr > 100)
+ if ((gU16)(int)g->p.ptr > 100)
g->p.ptr = (void *)100;
break;
default:
@@ -553,7 +553,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
priv = g->priv;
buf[0] = GNETCODE_CONTROL;
buf[1] = g->p.x;
- buf[2] = (uint16_t)(int)g->p.ptr;
+ buf[2] = (gU16)(int)g->p.ptr;
MUTEX_ENTER;
sendpkt(priv->netfd, buf, 3);
MUTEX_EXIT;
@@ -592,7 +592,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
g->g.Powermode = (gPowermode)g->p.ptr;
break;
case GDISP_CONTROL_BACKLIGHT:
- g->g.Backlight = (uint16_t)(int)g->p.ptr;
+ g->g.Backlight = (gU16)(int)g->p.ptr;
break;
}
}