type
stringclasses
5 values
content
stringlengths
9
163k
functions
void gc_marktrace(global_State *g, TraceNo traceno) { GCobj *o = obj2gco(traceref(G2J(g), traceno)); lua_assert(traceno != G2J(g)->cur.traceno); if (iswhite(o)) { white2gray(o); setgcrefr(o->gch.gclist, g->gc.gray); setgcref(g->gc.gray, o); }
functions
void gc_traverse_trace(global_State *g, GCtrace *T) { IRRef ref; if (T->traceno == 0) return; for (ref = T->nk; ref < REF_TRUE; ref++) { IRIns *ir = &T->ir[ref]; if (ir->o == IR_KGC) gc_markobj(g, ir_kgc(ir)); }
functions
void gc_traverse_proto(global_State *g, GCproto *pt) { ptrdiff_t i; gc_mark_str(proto_chunkname(pt)); for (i = -(ptrdiff_t)pt->sizekgc; i < 0; i++) /* Mark collectable consts. */ gc_markobj(g, proto_kgc(pt, i)); #if LJ_HASJIT if (pt->trace) gc_marktrace(g, pt->trace); #endif }
functions
MSize gc_traverse_frames(global_State *g, lua_State *th) { TValue *frame, *top = th->top-1, *bot = tvref(th->stack); /* Note: extra vararg frame not skipped, marks function twice (harmless). */ for (frame = th->base-1; frame > bot; frame = frame_prev(frame)) { GCfunc *fn = frame_func(frame); TValue *ftop ...
functions
void gc_traverse_thread(global_State *g, lua_State *th) { TValue *o, *top = th->top; for (o = tvref(th->stack)+1; o < top; o++) gc_marktv(g, o); if (g->gc.state == GCSatomic) { top = tvref(th->stack) + th->stacksize; for (; o < top; o++) /* Clear unmarked slots. */ setnilV(o); }
functions
size_t propagatemark(global_State *g) { GCobj *o = gcref(g->gc.gray); int gct = o->gch.gct; lua_assert(isgray(o)); gray2black(o); setgcrefr(g->gc.gray, o->gch.gclist); /* Remove from gray list. */ if (LJ_LIKELY(gct == ~LJ_TTAB)) { GCtab *t = gco2tab(o); if (gc_traverse_tab(g, t) > 0) black2gr...
functions
size_t gc_propagate_gray(global_State *g) { size_t m = 0; while (gcref(g->gc.gray) != NULL) m += propagatemark(g); return m; }
functions
void gc_shrink(global_State *g, lua_State *L) { if (g->strnum <= (g->strmask >> 2) && g->strmask > LJ_MIN_STRTAB*2-1) lj_str_resize(L, g->strmask >> 1); /* Shrink string table. */ if (g->tmpbuf.sz > LJ_MIN_SBUF*2) lj_str_resizebuf(L, &g->tmpbuf, g->tmpbuf.sz >> 1); /* Shrink temp buf. */ }
functions
int gc_mayclear(cTValue *o, int val) { if (tvisgcv(o)) { /* Only collectable objects can be weak references. */ if (tvisstr(o)) { /* But strings cannot be used as weak references. */ gc_mark_str(strV(o)); /* And need to be marked. */ return 0; }
functions
void gc_clearweak(GCobj *o) { while (o) { GCtab *t = gco2tab(o); lua_assert((t->marked & LJ_GC_WEAK)); if ((t->marked & LJ_GC_WEAKVAL)) { MSize i, asize = t->asize; for (i = 0; i < asize; i++) { /* Clear array slot when value is about to be collected. */ TValue *tv = arrayslot(t, i); if (gc...
functions
void gc_call_finalizer(global_State *g, lua_State *L, cTValue *mo, GCobj *o) { /* Save and restore lots of state around the __gc callback. */ uint8_t oldh = hook_save(g); MSize oldt = g->gc.threshold; int errcode; TValue *top; lj_trace_abort(g); top = L->top; L->top = top+2; hook_entergc(g); ...
functions
void gc_finalize(lua_State *L) { global_State *g = G(L); GCobj *o = gcnext(gcref(g->gc.mmudata)); cTValue *mo; lua_assert(gcref(g->jit_L) == NULL); /* Must not be called on trace. */ /* Unchain from list of userdata to be finalized. */ if (o == gcref(g->gc.mmudata)) setgcrefnull(g->gc.mmudata); else ...
functions
void lj_gc_finalize_udata(lua_State *L) { while (gcref(G(L)->gc.mmudata) != NULL) gc_finalize(L); }
functions
void lj_gc_finalize_cdata(lua_State *L) { global_State *g = G(L); CTState *cts = ctype_ctsG(g); if (cts) { GCtab *t = cts->finalizer; Node *node = noderef(t->node); ptrdiff_t i; setgcrefnull(t->metatable); /* Mark finalizer table as disabled. */ for (i = (ptrdiff_t)t->hmask; i >= 0; i--) ...
functions
void lj_gc_freeall(global_State *g) { MSize i, strmask; /* Free everything, except super-fixed objects (the main thread). */ g->gc.currentwhite = LJ_GC_WHITES | LJ_GC_SFIXED; gc_fullsweep(g, &g->gc.root); strmask = g->strmask; for (i = 0; i <= strmask; i++) /* Free all string hash chains. */ gc_fullswe...
functions
void atomic(global_State *g, lua_State *L) { size_t udsize; gc_mark_uv(g); /* Need to remark open upvalues (the thread may be dead). */ gc_propagate_gray(g); /* Propagate any left-overs. */ setgcrefr(g->gc.gray, g->gc.weak); /* Empty the list of weak tables. */ setgcrefnull(g->gc.weak); lua_assert(!isw...
functions
size_t gc_onestep(lua_State *L) { global_State *g = G(L); switch (g->gc.state) { case GCSpause: gc_mark_start(g); /* Start a new GC cycle by marking all GC roots. */ return 0; case GCSpropagate: if (gcref(g->gc.gray) != NULL) return propagatemark(g); /* Propagate one gray object. */ g->g...
functions
LJ_FASTCALL lj_gc_step(lua_State *L) { global_State *g = G(L); MSize lim; int32_t ostate = g->vmstate; setvmstate(g, GC); lim = (GCSTEPSIZE/100) * g->gc.stepmul; if (lim == 0) lim = LJ_MAX_MEM; if (g->gc.total > g->gc.threshold) g->gc.debt += g->gc.total - g->gc.threshold; do { lim -= (MSize...
functions
LJ_FASTCALL lj_gc_step_fixtop(lua_State *L) { if (curr_funcisL(L)) L->top = curr_topL(L); lj_gc_step(L); }
functions
LJ_FASTCALL lj_gc_step_jit(global_State *g, MSize steps) { lua_State *L = gco2th(gcref(g->jit_L)); L->base = mref(G(L)->jit_base, TValue); L->top = curr_topL(L); while (steps-- > 0 && lj_gc_step(L) == 0) ; /* Return 1 to force a trace exit. */ return (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCS...
functions
void lj_gc_fullgc(lua_State *L) { global_State *g = G(L); int32_t ostate = g->vmstate; setvmstate(g, GC); if (g->gc.state <= GCSatomic) { /* Caught somewhere in the middle. */ setmref(g->gc.sweep, &g->gc.root); /* Sweep everything (preserving it). */ setgcrefnull(g->gc.gray); /* Reset lists from part...
functions
void lj_gc_barrierf(global_State *g, GCobj *o, GCobj *v) { lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o)); lua_assert(g->gc.state != GCSfinalize && g->gc.state != GCSpause); lua_assert(o->gch.gct != ~LJ_TTAB); /* Preserve invariant during propagation. Otherwise it doesn't matter. */ if...
functions
LJ_FASTCALL lj_gc_barrieruv(global_State *g, TValue *tv) { (*((uint8_t *)(x) - offsetof(GCupval, tv) + offsetof(GCupval, marked))) if (g->gc.state == GCSpropagate || g->gc.state == GCSatomic) gc_mark(g, gcV(tv)); else TV2MARKED(tv) = (TV2MARKED(tv) & (uint8_t)~LJ_GC_COLORS) | curwhite(g); #undef TV2MARKE...
functions
void lj_gc_closeuv(global_State *g, GCupval *uv) { GCobj *o = obj2gco(uv); /* Copy stack slot to upvalue itself and point to the copy. */ copyTV(mainthread(g), &uv->tv, uvval(uv)); setmref(uv->v, &uv->tv); uv->closed = 1; setgcrefr(o->gch.nextgc, g->gc.root); setgcref(g->gc.root, o); if (isgray(o)) { /...
functions
void lj_gc_barriertrace(global_State *g, uint32_t traceno) { if (g->gc.state == GCSpropagate || g->gc.state == GCSatomic) gc_marktrace(g, traceno); }
functions
LJ_FASTCALL lj_mem_newgco(lua_State *L, MSize size) { global_State *g = G(L); GCobj *o = (GCobj *)g->allocf(g->allocd, NULL, 0, size); if (o == NULL) lj_err_mem(L); lua_assert(checkptr32(o)); g->gc.total += size; setgcrefr(o->gch.nextgc, g->gc.root); setgcref(g->gc.root, o); newwhite(g, o); return...
includes
#include <math.h>
includes
#include <SDL.h>
functions
int resolution_sort_func(const void *pa, const void *pb) { const resolution *a = (resolution*)pa; const resolution *b = (resolution*)pb; int areaA = a->width * a->height; int areaB = b->width * b->height; if (areaA == areaB) return 0; if (areaA < areaB) return -1; return 1; }
functions
void platform_update_fullscreen_resolutions() { int i, displayIndex, numDisplayModes; SDL_DisplayMode mode; resolution *resLook, *resPlace; float desktopAspectRatio, aspectRatio; // Query number of display modes displayIndex = SDL_GetWindowDisplayIndex(gWindow); numDisplayModes = SDL_GetNumDisplayModes(displayI...
functions
set if (gConfigGeneral.fullscreen_width == -1 || gConfigGeneral.fullscreen_height == -1) { gConfigGeneral.fullscreen_width = gResolutions[gNumResolutions - 1].width; gConfigGeneral.fullscreen_height = gResolutions[gNumResolutions - 1].height; }
functions
void platform_get_closest_resolution(int inWidth, int inHeight, int *outWidth, int *outHeight) { int i, destinationArea, areaDiff, closestAreaDiff, closestWidth, closestHeight; closestAreaDiff = -1; destinationArea = inWidth * inHeight; for (i = 0; i < gNumResolutions; i++) { // Check if exact match if (gResol...
functions
void platform_draw() { int width = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16); int height = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, sint16); if (gConfigGeneral.hardware_display) { void *pixels; int pitch; if (SDL_LockTexture(gBufferTexture, NULL, &pixels, &pitch) == 0) { uint8 *src = (uint8*)_screenBuf...
functions
else if (pitch == width + padding) { uint8 *dst = pixels; for (int y = height; y > 0; y++) { for (int x = width; x > 0; x--) { *dst++ = *(uint8 *)(&gPaletteHWMapped[*src++]); }
functions
void platform_resize(int width, int height) { uint32 flags; RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16) = width; RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, sint16) = height; platform_refresh_video(); flags = SDL_GetWindowFlags(gWindow); if ((flags & SDL_WINDOW_MINIMIZED) == 0) { window_resize_gui(width, hei...
functions
void platform_update_palette(char* colours, int start_index, int num_colours) { SDL_Surface *surface; int i; for (i = 0; i < 256; i++) { gPalette[i].r = colours[2]; gPalette[i].g = colours[1]; gPalette[i].b = colours[0]; gPalette[i].a = 0; colours += 4; if (gBufferTextureFormat != NULL) { gPaletteHWM...
functions
void platform_process_messages() { SDL_Event e; gLastKeyPressed = 0; // gCursorState.wheel = 0; gCursorState.left &= ~CURSOR_CHANGED; gCursorState.middle &= ~CURSOR_CHANGED; gCursorState.right &= ~CURSOR_CHANGED; gCursorState.old = 0; while (SDL_PollEvent(&e)) { switch (e.type) { case SDL_QUIT: // rct2...
functions
zero if (e.key.keysym.sym == SDLK_BACKSPACE && gTextInputLength > 0 && gTextInput && gTextInputCursorPosition){ // When at max length don't shift the data left // as it would buffer overflow. if (gTextInputCursorPosition != gTextInputMaxLength) memmove(gTextInput + gTextInputCursorPosition - 1, gTex...
functions
else if (e.key.keysym.sym == SDLK_RIGHT && gTextInput){ if (gTextInputCursorPosition < gTextInputLength) gTextInputCursorPosition++; console_refresh_caret(); }
functions
letter if (gTextInputLength > gTextInputCursorPosition){ memmove(gTextInput + gTextInputCursorPosition + 1, gTextInput + gTextInputCursorPosition, gTextInputMaxLength - gTextInputCursorPosition - 1); gTextInput[gTextInputCursorPosition] = text[i]; gTextInputLength++; }
functions
else if (gesturePixels < -tolerance) { _gestureRadius = 0; keyboard_shortcut_handle_command(SHORTCUT_ZOOM_VIEW_OUT); }
functions
letter if (gTextInputLength > gTextInputCursorPosition){ memmove(gTextInput + gTextInputCursorPosition + 1, gTextInput + gTextInputCursorPosition, gTextInputMaxLength - gTextInputCursorPosition - 1); gTextInput[gTextInputCursorPosition] = new_char; gTextInputLength++; }
functions
void platform_close_window() { if (gWindow != NULL) SDL_DestroyWindow(gWindow); if (_surface != NULL) SDL_FreeSurface(_surface); if (_palette != NULL) SDL_FreePalette(_palette); platform_unload_cursors(); }
functions
void platform_init() { platform_create_window(); gKeysPressed = malloc(sizeof(unsigned char) * 256); memset(gKeysPressed, 0, sizeof(unsigned char) * 256); // RCT2_CALLPROC(0x00404584); // dinput_init() }
functions
void platform_create_window() { int width, height; if (SDL_Init(SDL_INIT_VIDEO) < 0) { log_fatal("SDL_Init %s", SDL_GetError()); exit(-1); }
functions
int platform_scancode_to_rct_keycode(int sdl_key) { char keycode = (char)SDL_GetKeyFromScancode((SDL_Scancode)sdl_key); // Until we reshufle the text files to use the new positions // this will suffice to move the majority to the correct positions. // Note any special buttons PgUp PgDwn are mapped wrong. if (key...
functions
void platform_free() { free(gKeysPressed); platform_close_window(); SDL_Quit(); }
functions
void platform_start_text_input(char* buffer, int max_length) { SDL_StartTextInput(); gTextInputMaxLength = max_length - 1; gTextInput = buffer; gTextInputCursorPosition = strnlen(gTextInput, max_length); gTextInputLength = gTextInputCursorPosition; }
functions
void platform_stop_text_input() { SDL_StopTextInput(); gTextInput = NULL; }
functions
void platform_unload_cursors() { for (int i = 0; i < CURSOR_COUNT; i++) if (_cursors[i] != NULL) SDL_FreeCursor(_cursors[i]); }
functions
void platform_set_fullscreen_mode(int mode) { int width, height; mode = _fullscreen_modes[mode]; // HACK Changing window size when in fullscreen usually has no effect if (mode == SDL_WINDOW_FULLSCREEN) SDL_SetWindowFullscreen(gWindow, 0); // Set window size if (mode == SDL_WINDOW_FULLSCREEN) { platform_upd...
functions
else if (mode == 0) { SDL_SetWindowSize(gWindow, gConfigGeneral.window_width, gConfigGeneral.window_height); }
functions
void platform_set_cursor(char cursor) { SDL_SetCursor(_cursors[cursor]); }
functions
void platform_load_cursors() { RCT2_GLOBAL(0x14241BC, uint32) = 2; HINSTANCE hInst = RCT2_GLOBAL(RCT2_ADDRESS_HINSTANCE, HINSTANCE); RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_ARROW, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x74)); RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_BLANK, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE...
functions
int platform_get_cursor_pos(int* x, int* y) { POINT point; GetCursorPos(&point); *x = point.x; *y = point.y; }
functions
void platform_refresh_video() { int width = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16); int height = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, sint16); if (gConfigGeneral.hardware_display) { if (gRenderer == NULL) gRenderer = SDL_CreateRenderer(gWindow, -1, SDL_RENDERER_ACCELERATED); if (gBufferTexture !=...
functions
void platform_refresh_screenbuffer(int width, int height, int pitch) { int newScreenBufferSize = pitch * height; char *newScreenBuffer = (char*)malloc(newScreenBufferSize); if (_screenBuffer == NULL) { memset(newScreenBuffer, 0, newScreenBufferSize); }
includes
#include <stdint.h>
includes
#include <unistd.h>
includes
#include <stdio.h>
includes
#include <string.h>
includes
#include <stdlib.h>
includes
#include <getopt.h>
includes
#include <fcntl.h>
includes
#include <sys/ioctl.h>
includes
#include <linux/types.h>
includes
#include <linux/spi/spidev.h>
defines
#define LCD_PRINTF_BUF_SIZE 256
defines
#define DelayMs(x) usleep(x * 1000)
defines
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
functions
void pabort(const char *s) { perror(s); // abort(); }
functions
void LCDSetCurr_XY( unsigned char x, unsigned char y) { curr_x = 131-x; curr_y = y; }
functions
char LCDGetCurr_X( void) { return curr_x; }
functions
char LCDGetCurr_Y( void) { return curr_y; }
functions
void LCDPrint(const char *pString, unsigned char Size, unsigned int fColor, unsigned int bColor) { char c; unsigned char ytmp; unsigned char x, y; // x = curr_x; ytmp = y = curr_y; // loop until null-terminator is seen while (*pString != 0x00) { // c=*pString++; // Ciclo sulla coppia CRLF incrementand...
functions
void InitLcd(unsigned char type, const unsigned char* device) { unsigned char i; int ret; _type = type; LCDReset(); fd = open(device, O_FSYNC|O_RDWR); if (fd < 0) pabort("can't open device"); // mode |= SPI_CPHA; mode |= SPI_CPOL; ret = ioctl(fd, SPI_IOC_WR_MODE, &mode); if (ret == -1) pabort("c...
functions
void LCDPutStr(const char *pString, unsigned char x, unsigned char y, unsigned char Size, unsigned int fColor, unsigned int bColor) { char c; unsigned char xtmp, ytmp; // ^ Y // | // | // +----> X // y=131-y-FontHeight[Size]; xtmp=x; // loop until null-terminator is ...
functions
void LCDPutChar(char c, unsigned char x, unsigned char y, unsigned char size, unsigned int fColor, unsigned int bColor) { char i, j; unsigned char nCols; unsigned char nRows; unsigned char nBytes; unsigned char PixelRow; unsigned char Mask; unsigned int Word0; unsigned int Word1; unsigned int CharIdx; const u...
functions
void WriteSpiCommand(unsigned char cmd) { int ret; uint16_t buff; buff = cmd; struct spi_ioc_transfer tr = { .tx_buf = (unsigned long)&buff, .rx_buf = (unsigned long)NULL, .len = 2, .bits_per_word = 9, .delay_usecs = 0, }
functions
void WriteSpiData(unsigned char data) { int ret; uint16_t buff; buff = 0x0100 | data; struct spi_ioc_transfer tr = { .tx_buf = (unsigned long)&buff, .rx_buf = (unsigned long)NULL, .len = 2, .bits_per_word = 9, .delay_usecs = 0, }
functions
void WritePixelColor( unsigned int color) { int ret; uint16_t buff[]={0x0100,0x0100,0x0100}
functions
void WritePixelColorArray( unsigned char *data) { int ret; uint16_t buff[]={0x0100,0x0100,0x0100,0x0100,0x0100,0x0100}
functions
void LCDClearScreen(void) { unsigned int i; // loop counter unsigned char x1 = 0 + 0; unsigned char y1 = 0 + 0; unsigned char x2 = x1 + LCD_WIDTH - 1; unsigned char y2 = y1 + LCD_HEIGHT - 1; switch (_type) { case LCD6100: case LCD6610: WriteSpiCommand(0x15); // column...
functions
void LCDDrawScreen(unsigned int color) { unsigned int i; // loop counter unsigned char x1 = 0 + 0; unsigned char y1 = 0 + 0; unsigned char x2 = x1 + LCD_WIDTH - 1; unsigned char y2 = y1 + LCD_HEIGHT - 1; switch (_type) { case LCD6100: case LCD6610: WriteSpiCommand(0x1...
functions
void LCDSetPixel(unsigned char x, unsigned char y, unsigned int color) { switch (_type) { case LCD6100: case LCD6610: WriteSpiCommand(0x15); // column WriteSpiData(x); WriteSpiData(x); WriteSpiCommand(0x75); // row WriteSpiData(y); ...
functions
void LCDWrite130x130bmp (const unsigned char *bmp) { unsigned int j; WriteSpiCommand(0x2A); // column WriteSpiData (LCD_X_OFFSET); WriteSpiData (LCD_X_OFFSET + LCD_WIDTH - 1); // 130 pixel viewable // WriteSpiCommand(0x2B); // row WriteSpiData (LCD_Y_OFFSET); WriteSpiData (LCD_Y_OFFSET + LCD_HE...
functions
int LCDWriteFullScreenRGB (const char *filename) { unsigned int j, i, ii; unsigned char r, g, b; FILE *f; int ret; unsigned short lb[25742]; unsigned char *buff=(unsigned char*)malloc( LCD_WIDTH*LCD_HEIGHT*3); // metto a zero l'intero array memset( buff, 0x00, LCD_WIDTH*LCD_HEIGHT*3); f=fopen( filename,...
functions
int LCDWriteFullScreenRGB_2 (const char *filename) { unsigned int j, i; FILE *f; unsigned char *buff=(unsigned char*)malloc( LCD_WIDTH*LCD_HEIGHT*3); // metto a zero l'intero array memset( buff, 0x00, LCD_WIDTH*LCD_HEIGHT*3); f=fopen( filename, "rb"); if (f==NULL) { free(buff); return 1; }
functions
int LCDWriteRGB (const char *filename) { unsigned int j, i; unsigned char r, g, b; FILE *f; unsigned char *buff=(unsigned char*)malloc( LCD_WIDTH*LCD_HEIGHT*3); // metto a zero l'intero array memset( buff, 0x00, LCD_WIDTH*LCD_HEIGHT*3); f=fopen( filename, "rb"); if (f==NULL) { free(buff); return 1; ...
functions
int LCDMovieRGB (const char *filename) { unsigned int j, i; unsigned char r, g, b; FILE *f; unsigned char *buff=(unsigned char*)malloc( LCD_WIDTH*LCD_HEIGHT*3); // metto a zero l'intero array memset( buff, 0x00, LCD_WIDTH*LCD_HEIGHT*3); f=fopen( filename, "rb"); if (f==NULL) { free(buff); return 1; }
functions
int LCDWritebmp (const char *filename, unsigned char x, unsigned char y, unsigned char w, unsigned char h) { unsigned int j; FILE *f; unsigned char *buff=(unsigned char*)malloc( ((w*h)/2)*3); // metto a zero l'intero array memset( buff, 0x00, ((w*h)/2)*3); f=fopen( filename, "rb"); if (f==NULL) { free(b...
functions
void LCDWrite64x64bmp (unsigned char x, unsigned char y, const unsigned char *bmp) { unsigned int j; x=130-x; WriteSpiCommand(0x2A); // column WriteSpiData (x); WriteSpiData (x + 64 - 1); // // WriteSpiCommand(0x2B); // row WriteSpiData (y); WriteSpiData (y + 64 - 1); // 130 pixel viewa...
functions
void LCDWrite32x32bmp (unsigned char x, unsigned char y, const unsigned char *bmp) { unsigned int j; x=130-x; x-=32; WriteSpiCommand(0x2B); // column WriteSpiData (x); WriteSpiData (x + 32 - 1); // // WriteSpiCommand(0x2A); // row WriteSpiData (y); WriteSpiData (y + 32 - 1); // 130 pix...
functions
int LCDReset( void) { int exportfd; exportfd = open("/sys/class/gpio/export", O_WRONLY); if (exportfd < 0) { fprintf( stderr, "Cannot open GPIO to export it \n"); return -1; }
includes
#include <config.h>
includes
#include <string.h>
includes
#include <signal.h>
includes
#include <stdio.h>
includes
#include <gdk/gdkkeysyms.h>
includes
#include <X11/Xft/Xft.h>