Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_ls013b7dh03.h
1 #ifndef _BC_LS013B7DH03_H
2 #define _BC_LS013B7DH03_H
3 
4 #include <bc_gfx.h>
5 #include <bc_scheduler.h>
6 
10 
11 // http://www.mouser.com/ds/2/365/LS013B7DH03%20SPEC_SMA-224806.pdf
12 // https://www.embeddedartists.com/sites/default/files/support/datasheet/Memory_LCD_Programming.pdf
13 // See app note https://www.silabs.com/documents/public/application-notes/AN0048.pdf
14 // Figure 3.1
15 // 1B mode | 1B addr + 16B data + 1B dummy | 1B dummy END
16 #define BC_LS013B7DH03_FRAMEBUFFER_SIZE (1 + ((1+16+1) * 128) + 1)
17 #define BC_LS013B7DH03_WIDTH 128
18 #define BC_LS013B7DH03_HEIGHT 128
19 
21 
22 typedef struct
23 {
24  uint8_t _framebuffer[BC_LS013B7DH03_FRAMEBUFFER_SIZE];
25  uint8_t _vcom;
26  bc_scheduler_task_id_t _task_id;
27  bool (*_pin_cs_set)(bool state);
28 
30 
33 
34 void bc_ls013b7dh03_init(bc_ls013b7dh03_t *self, bool (*pin_cs_set)(bool state));
35 
38 
40 
45 
47 
50 
52 
58 
59 void bc_ls013b7dh03_draw_pixel(bc_ls013b7dh03_t *self, int x, int y, uint32_t color);
60 
66 
67 uint32_t bc_ls013b7dh03_get_pixel(bc_ls013b7dh03_t *self, int x, int y);
68 
73 
75 
79 
81 
83 
85 
87 
88 #endif //_BC_LS013B7DH03_H
uint32_t bc_ls013b7dh03_get_pixel(bc_ls013b7dh03_t *self, int x, int y)
Lcd get pixel.
bool bc_ls013b7dh03_is_ready(bc_ls013b7dh03_t *self)
Check if lcd is ready for commands.
Display size.
Definition: bc_gfx.h:13
const bc_gfx_driver_t * bc_ls013b7dh03_get_driver(void)
Get Lcd driver.
Display driver interface.
Definition: bc_gfx.h:22
size_t bc_scheduler_task_id_t
Task ID assigned by scheduler.
Definition: bc_scheduler.h:18
void bc_ls013b7dh03_clear(bc_ls013b7dh03_t *self)
Clear.
bc_gfx_caps_t bc_ls013b7dh03_get_caps(bc_ls013b7dh03_t *self)
Get capabilities.
bool bc_ls013b7dh03_update(bc_ls013b7dh03_t *self)
Lcd update, send data.
bool bc_ls013b7dh03_clear_memory_command(bc_ls013b7dh03_t *self)
Send Lcd clear memory command.
void bc_ls013b7dh03_init(bc_ls013b7dh03_t *self, bool(*pin_cs_set)(bool state))
Initialize lcd driver.
void bc_ls013b7dh03_draw_pixel(bc_ls013b7dh03_t *self, int x, int y, uint32_t color)
Lcd draw pixel.