Change coord_t to gCoord

release/v2.9
inmarket 2018-07-08 10:54:19 +10:00
parent 7e95acb731
commit 2ab2d77fcb
111 changed files with 564 additions and 562 deletions

View File

@ -3,8 +3,8 @@
#include <gfx.h>
void setup() {
coord_t width, height;
coord_t i, j;
gCoord width, height;
gCoord i, j;
pinMode(13, OUTPUT);

View File

@ -20,6 +20,7 @@ FEATURE: Added types gPtr and gPtrDiff
FEATURE: Added gI64 and gU64 when the compiler supports it. GFX_TYPE_64 macro is defined as GFXON if it does.
FEATURE: Fixed headers to ensure size_t, NULL are always defined. size_t is not used as it may be 64bit.
CHANGE: Added type gPoint to replace V2.x point and point_t
CHANGE: Added type gCoord to replace V2.x coord_t
FIX: Added gfxRealloc() to Qt port
FIX: Fixed UC1610 driver private area initialisation
FIX: Fixed ST7735 driver and added kapacuk changes

View File

@ -48,7 +48,7 @@ static GHandle gstatusConsole; // GConsole Handle to the Status Bar
static GEventMouse curPtr; // Holder for current pointer location
static font_t font;
static coord_t swidth, sheight;
static gCoord swidth, sheight;
// The toolbar buttons - Self-Explanatory
static GButtonObject btnNew, btnOpen, btnSave;

View File

@ -55,7 +55,7 @@ static GHandle nStatusConsole = NULL;
static volatile gBool doExit;
static void draw_point(coord_t x, coord_t y) {
static void draw_point(gCoord x, gCoord y) {
color_t c = ncoreDrawingArea->color;
if (nMode == NCORE_MODE_DRAW)
@ -71,7 +71,7 @@ static void draw_point(coord_t x, coord_t y) {
/* Bresenham's Line Drawing Algorithm
Modified version to draw line of variable thickness */
static void draw_line(coord_t x0, coord_t y0, coord_t x1, coord_t y1) {
static void draw_line(gCoord x0, gCoord y0, gCoord x1, gCoord y1) {
int16_t dy, dx;
int16_t addx, addy;
int16_t P, diff, i;
@ -130,7 +130,7 @@ static void draw_line(coord_t x0, coord_t y0, coord_t x1, coord_t y1) {
static DECLARE_THREAD_FUNCTION(ncoreDrawThread, msg) {
GEventMouse ev, evPrev;
coord_t dx, dy;
gCoord dx, dy;
int state = 0, dist;

View File

@ -63,9 +63,9 @@ static gfxThreadHandle thread;
#define SHADOWALPHA (255-255*0.2)
static DECLARE_THREAD_FUNCTION(task, param) {
coord_t width, height, x, y, radius, ballx, bally, dx, floor;
coord_t minx, miny, maxx, maxy, winx, winy;
coord_t ballcx, ballcy;
gCoord width, height, x, y, radius, ballx, bally, dx, floor;
gCoord minx, miny, maxx, maxy, winx, winy;
gCoord ballcx, ballcy;
color_t colour;
float ii, spin, dy, spinspeed, h, f, g;
(void) param;

View File

@ -115,14 +115,14 @@ static void nextline(GWidgetInit *pwi) {
pwi->g.y += pwi->g.height+1;
}
static void setbtntext(GWidgetInit *pwi, coord_t maxwidth, char *txt) {
static void setbtntext(GWidgetInit *pwi, gCoord maxwidth, char *txt) {
pwi->text = txt;
pwi->g.width = gdispGetStringWidth(pwi->text, font) + BUTTON_PADDING;
if (pwi->g.x + pwi->g.width > maxwidth)
nextline(pwi);
}
static void nextpos(GWidgetInit *pwi, coord_t maxwidth, coord_t nextwidth) {
static void nextpos(GWidgetInit *pwi, gCoord maxwidth, gCoord nextwidth) {
pwi->g.x += pwi->g.width+1;
pwi->g.width = nextwidth;
if (pwi->g.x + nextwidth > maxwidth)
@ -138,7 +138,7 @@ static void nextpos(GWidgetInit *pwi, coord_t maxwidth, coord_t nextwidth) {
*/
static void createWidgets(void) {
GWidgetInit wi;
coord_t border, pagewidth;
gCoord border, pagewidth;
gwinWidgetClearInit(&wi);

View File

@ -88,7 +88,7 @@ static int uitoa(unsigned int value, char * buf, int max) {
void benchmark(void) {
uint32_t i, pixels, ms, pps;
char pps_str[25];
coord_t height, width, rx, ry, rcx, rcy;
gCoord height, width, rx, ry, rcx, rcy;
color_t random_color;
font_t font;

View File

@ -62,7 +62,7 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint
if (!(gs = (GScopeObject *)_gwindowCreate(g, &gs->g, pInit, &scopeVMT, 0)))
return 0;
gs->nextx = 0;
if (!(gs->lastscopetrace = gfxAlloc(gs->g.width * sizeof(coord_t))))
if (!(gs->lastscopetrace = gfxAlloc(gs->g.width * sizeof(gCoord))))
return 0;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
gs->lasty = gs->g.height/2;
@ -82,10 +82,10 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint
void gwinScopeWaitForTrace(GHandle gh) {
#define gs ((GScopeObject *)(gh))
int i;
coord_t x, y;
coord_t yoffset;
gCoord x, y;
gCoord yoffset;
adcsample_t *pa;
coord_t *pc;
gCoord *pc;
GDataBuffer *pd;
uint8_t shr;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
@ -94,7 +94,7 @@ void gwinScopeWaitForTrace(GHandle gh) {
#elif TRIGGER_METHOD == TRIGGER_MINVALUE
gBool rdytrigger;
int flsamples;
coord_t scopemin;
gCoord scopemin;
#endif
if (gh->vmt != &scopeVMT)
@ -127,7 +127,7 @@ void gwinScopeWaitForTrace(GHandle gh) {
for(i = pd->len/sizeof(adcsample_t); i; i--) {
/* Calculate the new scope value - re-scale using simple shifts for efficiency, re-center and y-invert */
y = yoffset - (((coord_t)(*pa++) << shr) >> (16-SCOPE_Y_BITS));
y = yoffset - (((gCoord)(*pa++) << shr) >> (16-SCOPE_Y_BITS));
#if TRIGGER_METHOD == TRIGGER_MINVALUE
/* Calculate the scopemin ready for the next trace */

View File

@ -63,13 +63,13 @@
typedef struct GScopeObject_t {
GWindowObject g; // Base Class
coord_t *lastscopetrace; // To store last scope trace
coord_t nextx; // Where we are up to
gCoord *lastscopetrace; // To store last scope trace
gCoord nextx; // Where we are up to
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
coord_t lasty; // The last y value - used for trigger slope detection
gCoord lasty; // The last y value - used for trigger slope detection
#elif TRIGGER_METHOD == TRIGGER_MINVALUE
coord_t lasty; // The last y value - used for trigger slope detection
coord_t scopemin; // The last scopes minimum value
gCoord lasty; // The last y value - used for trigger slope detection
gCoord scopemin; // The last scopes minimum value
#endif
} GScopeObject;

View File

@ -134,7 +134,7 @@ static GTimer lsTimer;
*/
int main(void) {
GHandle ghScope;
coord_t swidth, sheight;
gCoord swidth, sheight;
#if defined(MY_DIAL_DEVICE) || defined(MY_TEMP_DEVICE)
GHandle ghText;
font_t font;

View File

@ -76,7 +76,7 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint
/* Initialise the scope object members and allocate memory for buffers */
gs->format = format;
gs->nextx = 0;
if (!(gs->lastscopetrace = (coord_t *)gfxAlloc(gs->g.width * sizeof(coord_t))))
if (!(gs->lastscopetrace = (gCoord *)gfxAlloc(gs->g.width * sizeof(gCoord))))
return 0;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
gs->lasty = gs->g.height/2;
@ -98,11 +98,11 @@ void gwinScopeWaitForTrace(GHandle gh) {
#define gs ((GScopeObject *)(gh))
GDataBuffer *paud;
int i;
coord_t x, y;
coord_t yoffset;
gCoord x, y;
gCoord yoffset;
uint8_t *pa8;
uint16_t *pa16;
coord_t *pc;
gCoord *pc;
uint8_t shr;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
@ -111,7 +111,7 @@ void gwinScopeWaitForTrace(GHandle gh) {
#elif TRIGGER_METHOD == TRIGGER_MINVALUE
gBool rdytrigger;
int flsamples;
coord_t scopemin;
gCoord scopemin;
#endif
if (gh->vmt != &scopeVMT)
@ -148,9 +148,9 @@ void gwinScopeWaitForTrace(GHandle gh) {
/* Calculate the new scope value - re-scale using simple shifts for efficiency, re-center and y-invert */
if (gfxSampleFormatBits(gs->format) <= 8)
y = yoffset - (((coord_t)(*pa8++ ) << shr) >> (16-SCOPE_Y_BITS));
y = yoffset - (((gCoord)(*pa8++ ) << shr) >> (16-SCOPE_Y_BITS));
else
y = yoffset - (((coord_t)(*pa16++) << shr) >> (16-SCOPE_Y_BITS));
y = yoffset - (((gCoord)(*pa16++) << shr) >> (16-SCOPE_Y_BITS));
#if TRIGGER_METHOD == TRIGGER_MINVALUE
/* Calculate the scopemin ready for the next trace */

View File

@ -63,14 +63,14 @@
typedef struct GScopeObject_t {
GWindowObject g; // Base Class
coord_t *lastscopetrace; // To store last scope trace
gCoord *lastscopetrace; // To store last scope trace
ArrayDataFormat format; // The sample format
coord_t nextx; // Where we are up to
gCoord nextx; // Where we are up to
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
coord_t lasty; // The last y value - used for trigger slope detection
gCoord lasty; // The last y value - used for trigger slope detection
#elif TRIGGER_METHOD == TRIGGER_MINVALUE
coord_t lasty; // The last y value - used for trigger slope detection
coord_t scopemin; // The last scopes minimum value
gCoord lasty; // The last y value - used for trigger slope detection
gCoord scopemin; // The last scopes minimum value
#endif
} GScopeObject;

View File

@ -51,7 +51,7 @@ static GScopeObject gScopeWindow;
*/
int main(void) {
GHandle ghScope;
coord_t swidth, sheight;
gCoord swidth, sheight;
gfxInit();

View File

@ -30,7 +30,7 @@
#include "gfx.h"
int main(void) {
coord_t width, height, r1, r2, cx, cy;
gCoord width, height, r1, r2, cx, cy;
uint8_t sectors;
// Initialize and clear the display

View File

@ -30,8 +30,8 @@
#include "gfx.h"
int main(void) {
coord_t width, height;
coord_t i, j;
gCoord width, height;
gCoord i, j;
// Initialize and clear the display
gfxInit();

View File

@ -30,7 +30,7 @@
#include "gfx.h"
int main(void) {
coord_t width, height;
gCoord width, height;
// Initialize and clear the display
gfxInit();

View File

@ -30,9 +30,9 @@
#include "gfx.h"
int main(void) {
coord_t width, y;
gCoord width, y;
font_t font1, font2;
coord_t fheight1, fheight2;
gCoord fheight1, fheight2;
const char *line1, *line2;
char buf[8];

View File

@ -39,7 +39,7 @@
static gdispImage myImage;
int main(void) {
coord_t swidth, sheight;
gCoord swidth, sheight;
// Initialize uGFX and the underlying system
gfxInit();

View File

@ -54,7 +54,7 @@ static gdispImage myImage;
* Orange - Decoding a frame has produced an error.
*/
int main(void) {
coord_t swidth, sheight, errx, erry, errcx, errcy;
gCoord swidth, sheight, errx, erry, errcx, errcy;
delaytime_t delay;
gfxInit(); // Initialize the display

View File

@ -45,8 +45,8 @@
#if USE_METHOD_1
int main(void) {
coord_t width, height;
coord_t display, i, j, cnt;
gCoord width, height;
gCoord display, i, j, cnt;
font_t f;
GDisplay *g;
char buf[16];
@ -89,8 +89,8 @@
}
#else
int main(void) {
coord_t width, height;
coord_t display, i, j, cnt;
gCoord width, height;
gCoord display, i, j, cnt;
font_t f;
char buf[16];

View File

@ -36,8 +36,8 @@ static GDisplay* pixmap;
static pixel_t* surface;
int main(void) {
coord_t width, height;
coord_t i, j;
gCoord width, height;
gCoord i, j;
// Initialize and clear the display
gfxInit();

View File

@ -69,7 +69,7 @@ static gPoint oldresult[NUM_POINTS];
int main(void) {
coord_t width, height;
gCoord width, height;
mtype scalex, scaley;
mtype scaleincx, scaleincy;
mtype translatex, translatey;

View File

@ -57,9 +57,9 @@
#define SHADOWALPHA (255-255*0.2)
int main(void) {
coord_t width, height, x, y, radius, ballx, bally, dx, floor;
coord_t minx, miny, maxx, maxy;
coord_t ballcx, ballcy;
gCoord width, height, x, y, radius, ballx, bally, dx, floor;
gCoord minx, miny, maxx, maxy;
gCoord ballcx, ballcy;
color_t colour;
float ii, spin, dy, spinspeed, h, f, g;

View File

@ -64,8 +64,8 @@ static const transTable FrenchTranslation = { sizeof(FrenchStrings)/sizeof(Frenc
void updateText()
{
coord_t width = 400;
coord_t height = 30;
gCoord width = 400;
gCoord height = 30;
// Translate some basic strings
gdispFillStringBox(20, 20, width, height, gt("Welcome"), font, COLOR_TEXT, COLOR_BACKGROUND, justifyLeft);

View File

@ -33,7 +33,7 @@
GHandle GW1, GW2;
int main(void) {
coord_t i, j;
gCoord i, j;
/* Initialize and clear the display */
gfxInit();

View File

@ -171,7 +171,7 @@ static gdispImage imgYesNo;
#endif
// Wrap buttons onto the next line if they don't fit.
static void setbtntext(GWidgetInit *pwi, coord_t maxwidth, char *txt) {
static void setbtntext(GWidgetInit *pwi, gCoord maxwidth, char *txt) {
if (pwi->g.x >= maxwidth) {
pwi->g.x = 5;
pwi->g.y += pwi->g.height+1;
@ -194,7 +194,7 @@ static void setbtntext(GWidgetInit *pwi, coord_t maxwidth, char *txt) {
*/
static void createWidgets(void) {
GWidgetInit wi;
coord_t border, pagewidth;
gCoord border, pagewidth;
gwinWidgetClearInit(&wi);

View File

@ -34,9 +34,9 @@
static GConsoleObject gc;
static font_t font;
static coord_t bHeight;
static gCoord bHeight;
static GHandle ghc;
static coord_t swidth, sheight;
static gCoord swidth, sheight;
#if !GWIN_CONSOLE_USE_FLOAT
#error "You need to enable float support for the console widget. (GWIN_CONSOLE_USE_FLOAT)"

View File

@ -38,9 +38,9 @@
static GConsoleObject gc;
static GListener gl;
static font_t font;
static coord_t bWidth, bWidth2, bHeight;
static gCoord bWidth, bWidth2, bHeight;
static GHandle ghc;
static coord_t swidth, sheight;
static gCoord swidth, sheight;
static void DrawHeader(const char *title, gBool btnNext, gBool btnPrev, gBool btnPlusMinus) {
#if GDISP_NEED_CLIP

View File

@ -38,9 +38,9 @@
static GConsoleObject gc;
static GListener gl;
static font_t font;
static coord_t bHeight;
static gCoord bHeight;
static GHandle ghc;
static coord_t swidth, sheight;
static gCoord swidth, sheight;
/*------------------------------------------------------------------------*
* GINPUT Touch Driver Calibrator. *

View File

@ -187,7 +187,7 @@ static gBool sendpkt(uint16_t *pkt, int len) {
GEventMouse *pem;
uint16_t cmd[2];
uint16_t lbuttons;
coord_t lx, ly;
gCoord lx, ly;
(void) param;
// Initialize the mouse and the listener.

View File

@ -29,7 +29,7 @@
typedef struct fbPriv {
void* pixels; // The pixel buffer
coord_t linelen; // The number of bytes per display line
gCoord linelen; // The number of bytes per display line
void* frame0;
void* frame1;
} fbPriv;
@ -177,7 +177,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay* g)
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -187,7 +187,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay* g)
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

View File

@ -15,7 +15,7 @@
typedef struct fbInfo {
void * pixels; // The pixel buffer
coord_t linelen; // The number of bytes per display line
gCoord linelen; // The number of bytes per display line
} fbInfo;
#include "board_fb24bpp.h"
@ -155,7 +155,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -165,7 +165,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

View File

@ -342,7 +342,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_BITFILLS
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
coord_t lg, x, y;
gCoord lg, x, y;
uint16_t c1, c2;
unsigned tuples;
const pixel_t *buffer;

View File

@ -117,7 +117,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@ -156,7 +156,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -209,7 +209,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -219,7 +219,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

View File

@ -127,7 +127,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@ -166,7 +166,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -219,7 +219,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -229,7 +229,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

View File

@ -3,7 +3,7 @@
#include "../../../src/gdisp/gdisp_driver.h"
#include "gdisp_lld_qimage.h"
gBool qimage_init(GDisplay* g, coord_t width, coord_t height)
gBool qimage_init(GDisplay* g, gCoord width, gCoord height)
{
QImage* qimage = new QImage(width, height, QImage::Format_RGB888);
if (!qimage) {

View File

@ -7,7 +7,7 @@
extern "C" {
#endif
gBool qimage_init(GDisplay* g, coord_t width, coord_t height);
gBool qimage_init(GDisplay* g, gCoord width, gCoord height);
void qimage_setPixel(GDisplay* g);
color_t qimage_getPixel(GDisplay* g);

View File

@ -259,7 +259,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
pixel_t *buffer;
coord_t ycnt;
gCoord ycnt;
buffer = (pixel_t *)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2;

View File

@ -169,9 +169,9 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FILLS
LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
coord_t sy, ey;
coord_t sx, ex;
coord_t col;
gCoord sy, ey;
gCoord sx, ex;
gCoord col;
unsigned spage, zpages;
uint8_t * base;
uint8_t mask;
@ -236,7 +236,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -267,7 +267,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:

View File

@ -189,7 +189,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
uint8_t *ram;
switch(g->g.Orientation) {
@ -220,7 +220,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
LLDCOLOR_TYPE c;
switch(g->g.Orientation) {

View File

@ -341,8 +341,8 @@ LLDSPEC void gdisp_lld_clear (GDisplay *g)
#if GDISP_HARDWARE_FILLS
LLDSPEC void gdisp_lld_fill_area (GDisplay *g)
{
coord_t scol, ecol, sx, ex;
coord_t y, col, x;
gCoord scol, ecol, sx, ex;
gCoord y, col, x;
uint16_t area = (uint16_t) g->p.cx * g->p.cy;
uint8_t temp;
@ -400,7 +400,7 @@ LLDSPEC void gdisp_lld_fill_area (GDisplay *g)
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel (GDisplay *g)
{
coord_t x, y;
gCoord x, y;
switch (g->g.Orientation)
{
@ -436,7 +436,7 @@ LLDSPEC void gdisp_lld_draw_pixel (GDisplay *g)
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color (GDisplay *g)
{
coord_t x, y;
gCoord x, y;
switch (g->g.Orientation)
{
@ -554,8 +554,8 @@ LLDSPEC void gdisp_lld_control (GDisplay *g)
#if GDISP_HARDWARE_BITFILLS
LLDSPEC void gdisp_lld_blit_area (GDisplay *g)
{
coord_t scol, ecol, sx;
coord_t y, col;
gCoord scol, ecol, sx;
gCoord y, col;
uint16_t area;
uint8_t temp, temp2, i;

View File

@ -17,7 +17,7 @@
#define CALC_FPR(w,h,hb,hf,hp,vb,vf,vp,fps) ((fps * CALC_PERIOD(w,hb,hf,hp) * CALC_PERIOD(h,vb,vf,vp) * 1048576)/100000000)
typedef struct LCD_Parameters {
coord_t width, height; // Panel width and height
gCoord width, height; // Panel width and height
uint16_t hbporch; // Horizontal Back Porch
uint16_t hfporch; // Horizontal Front Porch
uint16_t hpulse; // Horizontal Pulse

View File

@ -295,7 +295,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g) {
LLDSPEC void gdisp_lld_blit_area(GDisplay* g) {
pixel_t* buffer;
coord_t ycnt;
gCoord ycnt;
buffer = (pixel_t*)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2;

View File

@ -166,7 +166,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -197,7 +197,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:

View File

@ -48,13 +48,13 @@
typedef struct ltdcLayerConfig {
// Frame
LLDCOLOR_TYPE* frame; // Frame buffer address
coord_t width, height; // Frame size in pixels
coord_t pitch; // Line pitch, in bytes
gCoord width, height; // Frame size in pixels
gCoord pitch; // Line pitch, in bytes
uint16_t fmt; // Pixel format in LTDC format
// Window
coord_t x, y; // Start pixel position of the virtual layer
coord_t cx, cy; // Size of the virtual layer
gCoord x, y; // Start pixel position of the virtual layer
gCoord cx, cy; // Size of the virtual layer
uint32_t defcolor; // Default color, ARGB8888
uint32_t keycolor; // Color key, RGB888
@ -66,10 +66,10 @@ typedef struct ltdcLayerConfig {
} ltdcLayerConfig;
typedef struct ltdcConfig {
coord_t width, height; // Screen size
coord_t hsync, vsync; // Horizontal and Vertical sync pixels
coord_t hbackporch, vbackporch; // Horizontal and Vertical back porch pixels
coord_t hfrontporch, vfrontporch; // Horizontal and Vertical front porch pixels
gCoord width, height; // Screen size
gCoord hsync, vsync; // Horizontal and Vertical sync pixels
gCoord hbackporch, vbackporch; // Horizontal and Vertical back porch pixels
gCoord hfrontporch, vfrontporch; // Horizontal and Vertical front porch pixels
uint32_t syncflags; // Sync flags
uint32_t bgcolor; // Clear screen color RGB888
@ -382,7 +382,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay* g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -392,7 +392,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay* g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

View File

@ -133,7 +133,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@ -172,7 +172,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -229,7 +229,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -239,7 +239,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

View File

@ -138,7 +138,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@ -177,7 +177,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -234,7 +234,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -244,7 +244,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

View File

@ -45,10 +45,10 @@
#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER << 0)
typedef struct UC1610_Window {
coord_t x1;
coord_t y1;
coord_t x2;
coord_t y2;
gCoord x1;
gCoord y1;
gCoord x2;
gCoord y2;
} UC1610_Window;
/*===========================================================================*/
@ -133,7 +133,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
uint8_t *c;
// handle orientation
@ -170,7 +170,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FLUSH
LLDSPEC void gdisp_lld_flush(GDisplay* g)
{
coord_t x1, y1, x2, y2, cx;
gCoord x1, y1, x2, y2, cx;
uint8_t *c;
// Don't flush unless we really need to

View File

@ -309,7 +309,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
#if GDISP_HARDWARE_FLUSH
LLDSPEC void gdisp_lld_flush(GDisplay* g)
{
coord_t cy, cx, dx, dy;
gCoord cy, cx, dx, dy;
LLDCOLOR_TYPE *fb;
UC8173_Private *priv;
@ -390,7 +390,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay* g)
{
coord_t x, y;
gCoord x, y;
UC8173_Private *priv;
priv = (UC8173_Private *)g->priv;

View File

@ -163,7 +163,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:

View File

@ -15,7 +15,7 @@
typedef struct fbInfo {
void * pixels; // The pixel buffer
coord_t linelen; // The number of bytes per display line
gCoord linelen; // The number of bytes per display line
} fbInfo;
#include "board_framebuffer.h"
@ -135,7 +135,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -145,7 +145,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

View File

@ -65,8 +65,8 @@ static gBool ft5336ReadXYZ(GMouse* m, GMouseReading* pdr)
// Only take a reading if exactly one touch contact point
if (read_byte(m, FT5336_TD_STAT_REG) == 1) {
// Get and return X, Y an Z values
pdr->y = (coord_t)(read_word(m, FT5336_P1_XH_REG) & 0x0FFF);
pdr->x = (coord_t)(read_word(m, FT5336_P1_YH_REG) & 0x0FFF);
pdr->y = (gCoord)(read_word(m, FT5336_P1_XH_REG) & 0x0FFF);
pdr->x = (gCoord)(read_word(m, FT5336_P1_YH_REG) & 0x0FFF);
pdr->z = 1;
}

View File

@ -68,8 +68,8 @@ static gBool read_xyz(GMouse* m, GMouseReading* pdr)
if ((read_byte(m, FT5x06_TOUCH_POINTS) & 0x07)) {
/* Get the X, Y, Z values */
pdr->x = (coord_t)(read_word(m, FT5x06_TOUCH1_XH) & 0x0fff);
pdr->y = (coord_t)read_word(m, FT5x06_TOUCH1_YH);
pdr->x = (gCoord)(read_word(m, FT5x06_TOUCH1_XH) & 0x0fff);
pdr->y = (gCoord)read_word(m, FT5x06_TOUCH1_YH);
pdr-&g