35#define __UCONCAT(a, b) #a b
36#define _UCONCAT(a, b) __UCONCAT(a, b)
37#define UCONCAT(b) _UCONCAT(__USER_LABEL_PREFIX__, b)
57 COMMAND_SET_X_WINDOW = 0x2A,
58 COMMAND_SET_Y_WINDOW = 0x2B,
59 COMMAND_PREPARE_FOR_DRAW_DATA = 0x2C,
60 COMMAND_READ_DRAW_DATA = 0x2E
63volatile uint16_t *
const lcd_data_port = (
volatile uint16_t *)0xB4000000;
73#define RGB_TO_RGB565(r, g, b) ( \
74 ((r & 0x1F) << 11) | \
85#define RGB565_TO_R(rgb565) ((rgb565 >> 11) & 0x1F)
93#define RGB565_TO_G(rgb565) ((rgb565 >> 5) & 0x3F)
101#define RGB565_TO_B(rgb565) (rgb565 & 0x1F)
116extern uint16_t (*
LCD_GetPixel)(
unsigned int x,
unsigned int y);
123extern void (*
LCD_GetSize)(
unsigned int *width,
unsigned int *height);
125extern uint16_t *(*_FP_LCD_GetVRAMAddress)() __asm__ (UCONCAT(
"LCD_GetVRAMAddress"));
134static inline __attribute__((
const, always_inline)) uint16_t *LCD_GetVRAMAddress() {
135 return _FP_LCD_GetVRAMAddress();
150extern void (*
LCD_SetPixel)(
unsigned int x,
unsigned int y, uint16_t color);
152extern void (*LCD_SetPixelFromPaletteU)(
unsigned int x,
unsigned int y, uint8_t index) __asm__ (UCONCAT(
"LCD_SetPixelFromPalette"));
161static inline __attribute__((always_inline))
void LCD_SetPixelFromPalette(
unsigned int x,
unsigned int y,
enum LCD_Palette color) {
162 LCD_SetPixelFromPaletteU(x, y, (uint8_t)color);
182extern void (*LCD_SendCommandU)(uint16_t command) __asm__ (UCONCAT(
"LCD_SendCommand"));
187static inline __attribute__((always_inline))
void LCD_SendCommand(
enum LCD_Command command) {
188 LCD_SendCommandU(command);
197extern void (*
LCD_SetDrawingBounds)(
unsigned int xstart,
unsigned int xend,
unsigned int ystart,
unsigned int yend);
void(* LCD_SetDrawingBounds)(unsigned int xstart, unsigned int xend, unsigned int ystart, unsigned int yend)
static unsigned int enum LCD_Palette color void(* LCD_VRAMBackup)()
Definition lcd.h:172
void(* LCD_SetPixel)(unsigned int x, unsigned int y, uint16_t color)
LCD_Command
Definition lcd.h:56
LCD_Palette
Definition lcd.h:42
void(* LCD_VRAMRestore)()
uint16_t(* LCD_GetPixel)(unsigned int x, unsigned int y)
void(* LCD_ClearScreen)()
void(* LCD_GetSize)(unsigned int *width, unsigned int *height)