22 #ifndef IL3820_H // Prevents duplicate 23 #define IL3820_H // declarations 25 #if defined(__cplusplus) // If compiling for C++ 30 #include "simpletools.h" 31 #include "simplegfx.h" 49 #ifndef IL3820_DRIVER_OUTPUT 50 #define IL3820_DRIVER_OUTPUT 0x01 53 #ifndef IL3820_BOOSTER_SOFT_START 54 #define IL3820_BOOSTER_SOFT_START 0x0C 57 #ifndef IL3820_GATE_SCAN_START 58 #define IL3820_GATE_SCAN_START 0x0F 61 #ifndef IL3820_DEEP_SLEEP_MODE 62 #define IL3820_DEEP_SLEEP_MODE 0x10 65 #ifndef IL3820_DATA_ENTRY_MODE 66 #define IL3820_DATA_ENTRY_MODE 0x11 69 #ifndef IL3820_SW_RESET 70 #define IL3820_SW_RESET 0x12 73 #ifndef IL3820_TEMPERATURE_SENSOR 74 #define IL3820_TEMPERATURE_SENSOR 0x1A 77 #ifndef IL3820_MASTER_ACTIVATION 78 #define IL3820_MASTER_ACTIVATION 0x20 81 #ifndef IL3820_DISPLAY_UPDATE_1 82 #define IL3820_DISPLAY_UPDATE_1 0x21 85 #ifndef IL3820_DISPLAY_UPDATE_2 86 #define IL3820_DISPLAY_UPDATE_2 0x22 89 #ifndef IL3820_WRITE_RAM 90 #define IL3820_WRITE_RAM 0x24 93 #ifndef IL3820_WRITE_VCOM_REGISTER 94 #define IL3820_WRITE_VCOM_REGISTER 0x2C 97 #ifndef IL3820_WRITE_LUT_REGISTER 98 #define IL3820_WRITE_LUT_REGISTER 0x32 101 #ifndef IL3820_SET_DUMMY_LINE_PERIOD 102 #define IL3820_SET_DUMMY_LINE_PERIOD 0x3A 105 #ifndef IL3820_SET_GATE_TIME 106 #define IL3820_SET_GATE_TIME 0x3B 109 #ifndef IL3820_BORDER_WAVEFORM_CONTROL 110 #define IL3820_BORDER_WAVEFORM_CONTROL 0x3C 113 #ifndef IL3820_SET_RAM_X_ADDRESS_POSITION 114 #define IL3820_SET_RAM_X_ADDRESS_POSITION 0x44 117 #ifndef IL3820_SET_RAM_Y_ADDRESS_POSITION 118 #define IL3820_SET_RAM_Y_ADDRESS_POSITION 0x45 121 #ifndef IL3820_SET_RAM_X_ADDRESS_COUNTER 122 #define IL3820_SET_RAM_X_ADDRESS_COUNTER 0x4E 125 #ifndef IL3820_SET_RAM_Y_ADDRESS_COUNTER 126 #define IL3820_SET_RAM_Y_ADDRESS_COUNTER 0x4F 129 #ifndef IL3820_TERMINATE_FRAME_READ_WRITE 130 #define IL3820_TERMINATE_FRAME_READ_WRITE 0xFF 154 screen_t *
il3820_init(
char sid,
char sclk,
char cs,
char rs,
char rst,
char busy,
int width,
int height);
187 void il3820_spiWrite(
int mask_cs,
int mask_sdi,
int mask_clk,
int mask_dc,
char c,
char dc);
204 void il3820_spiWriteBytes(
int mask_cs,
int mask_sdi,
int mask_clk,
const unsigned char* data,
int numBytes);
296 #if defined(__cplusplus) 301 #endif // End prevent duplicate forward void il3820_wakeDisplay(screen_t *dev)
Turn the display on from a sleep mode.
Definition: il3820_sleepWake.c:35
void il3820_resetDisplay(screen_t *dev)
Resets the display.
Definition: il3820_reset.c:38
void il3820_drawFastHLine(screen_t *dev, int x0, int x1, int y, int color)
Draws a horizontal line on the screen in the specified color. No bounds checking (used by other funct...
void il3820_spiWrite(int mask_cs, int mask_sdi, int mask_clk, int mask_dc, char c, char dc)
Low-level driver for sending a byte to the ePaper screen.
Definition: il3820_spiWrite.c:24
void il3820_writeLockSet(char devId)
Sets the SPI communication lockout.
Definition: il3820_spiWrite.c:66
screen_t * il3820_init(char sid, char sclk, char cs, char rs, char rst, char busy, int width, int height)
Initializes the ePaper screen by setting up it's SPI and control pins.
Definition: il3820_init.c:25
char il3820_writeLock()
Returns the status of the SPI communication lockout so multiple cogs don't try to write to it at the ...
Definition: il3820_spiWrite.c:62
void il3820_writeLockClear(char devId)
Clears the SPI communication lockout.
Definition: il3820_spiWrite.c:71
void il3820_clearDisplay(screen_t *dev)
Clears the screen by setting the full area of the display to white.
Definition: il3820_clear.c:20
void il3820_drawPixel(screen_t *dev, int x, int y, int color)
Draws a single pixel on the screen in the specified color. No checking.
void il3820_updateDisplay(screen_t *dev)
Update the display with whatever is in the frame memory. You need to have updated the frame memory wi...
Definition: il3820_update.c:21
void il3820_sleepDisplay(screen_t *dev)
Turn the display off without changing it's contents (make it sleep).
Definition: il3820_sleepWake.c:22
void il3820_drawFastVLine(screen_t *dev, int y0, int y1, int x, int color)
Draws a vertical line on the screen in the specified color. No bounds checking (used by other functio...
void il3820_spiWriteBytes(int mask_cs, int mask_sdi, int mask_clk, const unsigned char *data, int numBytes)
Low-level driver for sending multiple bytes to the ePaper screen.