13 void line(
int x1,
int y1,
int x2,
int y2, uint16_t color);
14 void triangle(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2, uint16_t colorFill, uint16_t colorLine);
15 void fillScreen(uint16_t color);
17 inline uint16_t color(uint8_t R, uint8_t G, uint8_t B){
18 return (((R<<8) & 0b1111100000000000) |
19 ((G<<3) & 0b0000011111100000) |
20 ((B>>3) & 0b0000000000011111));
23 inline void setPixel(
int x,
int y, uint32_t color) {
24 if(x>=0 && x < width && y>=0 && y < height)
25 vram[width*y + x] = color;
30 inline void calcInit(){
35 inline void calcEnd(){
42 extern "C" void getKey(uint32_t *key1, uint32_t *key2);
45 KEY_SHIFT = 0x80000000,
46 KEY_CLEAR = 0x00020000,
47 KEY_BACKSPACE = 0x00000080,
48 KEY_LEFT = 0x00004000,
49 KEY_RIGHT = 0x00008000,
51 KEY_POWER = 0x00000040,
52 KEY_DIVIDE = 0x40000000,
53 KEY_MULTIPLY = 0x20000000,
54 KEY_SUBTRACT = 0x10000000,
64 KEY_KEYBOARD = 0x80000000,
66 KEY_DOWN = 0x00400000,
67 KEY_EQUALS = 0x00000080,
70 KEY_LEFT_BRACKET = 0x00000020,
71 KEY_RIGHT_BRACKET = 0x00000010,
72 KEY_COMMA = 0x00000008,
73 KEY_NEGATIVE = 0x00000004,
84 inline bool testKey(uint32_t key1, uint32_t key2, Keys1 key){
86 if (key1 & key)
return true;
90 inline bool testKey(uint32_t key1, uint32_t key2, Keys2 key){
92 if (key2 & key)
return true;
Functions for interacting with the LCD and VRAM.
uint16_t * LCD_GetVRAMAddress()
void LCD_GetSize(int *width, int *height)