Init
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define LCD_WIDTH 240
|
||||
#define LCD_HEIGHT 135
|
||||
|
||||
#define X_OFFSET 40
|
||||
#define Y_OFFSET 53
|
||||
|
||||
#define SPI_MAX_CHUNK 4092
|
||||
|
||||
extern uint16_t framebuffer[LCD_WIDTH * LCD_HEIGHT];
|
||||
|
||||
void st7789_write_cmd(uint8_t cmd);
|
||||
void st7789_write_data(const void *data, size_t len);
|
||||
void st7789_set_window(uint16_t xs, uint16_t ys, uint16_t xe, uint16_t ye);
|
||||
void st7789_push_pixels(const uint16_t *pixels, size_t count);
|
||||
void st7789_init(void);
|
||||
|
||||
void fb_set_pixel(uint16_t x, uint16_t y, uint16_t color);
|
||||
|
||||
void st7789_flush_full(void);
|
||||
|
||||
void st7789_flush(void);
|
||||
|
||||
void st7789_fill(uint16_t color);
|
||||
|
||||
void st7789_fill_rect(uint16_t x, uint16_t y, uint16_t w, uint16_t h,
|
||||
uint16_t color);
|
||||
|
||||
void st7789_draw_rect(uint16_t x, uint16_t y, uint16_t w, uint16_t h,
|
||||
uint16_t color);
|
||||
|
||||
void st7789_blit_rgb565(uint16_t x, uint16_t y, uint16_t w, uint16_t h,
|
||||
const uint16_t *data);
|
||||
|
||||
void st7789_fill(uint16_t color);
|
||||
|
||||
void st7789_draw_char(uint16_t x, uint16_t y, char c, uint16_t fg, uint16_t bg,
|
||||
bool drawBG, const uint8_t font[][5]);
|
||||
|
||||
void st7789_draw_string(uint16_t x, uint16_t y, const char *s, uint16_t fg,
|
||||
uint16_t bg, bool drawBG, const uint8_t font[][5]);
|
||||
Reference in New Issue
Block a user