Device driver for black/white e-ink/e-paper SPI displays.
More...
Device driver for black/white e-ink/e-paper SPI displays.
This driver provides functionality for working with black/white e-ink (e-paper) SPI displays. Various display controllers are currently supported out of the box, see epd_bw_spi_params.h. Please open an issue or pull request with your controller details (size, Vcom, LUTs) if your display controller is not included yet.
Use of this driver requires knowing the parameters of your display. See epd_bw_spi_params_t and epd_bw_spi_params.h for more details on the parameters. Note that while the reset and busy pins are optional, using them is highly recommended.
This driver has Display device generic API support.
|
int | epd_bw_spi_init (epd_bw_spi_t *dev, const epd_bw_spi_params_t *params) |
| Initialise the display.
|
|
void | epd_bw_spi_activate (epd_bw_spi_t *dev) |
| Activate the display.
|
|
void | epd_bw_spi_deactivate (epd_bw_spi_t *dev) |
| Deactivate the display.
|
|
void | epd_bw_spi_init_full (epd_bw_spi_t *dev) |
| Initialise the display for a full refresh.
|
|
void | epd_bw_spi_update_full (epd_bw_spi_t *dev) |
| Update the display with a full refresh.
|
|
void | epd_bw_spi_init_part (epd_bw_spi_t *dev) |
| Initialise the display for a partial refresh.
|
|
void | epd_bw_spi_update_part (epd_bw_spi_t *dev) |
| Update the display with a partial refresh.
|
|
void | epd_bw_spi_init_auto (epd_bw_spi_t *dev) |
| Initialise the display for an automatic partial/full refresh.
|
|
void | epd_bw_spi_update_auto (epd_bw_spi_t *dev) |
| Update the display with an automatic partial/full refresh.
|
|
void | epd_bw_spi_clear (epd_bw_spi_t *dev) |
| Clear the entire display.
|
|
void | epd_bw_spi_fill (epd_bw_spi_t *dev, uint8_t x1, uint8_t x2, uint16_t y1, uint16_t y2, uint8_t color) |
| Fill an area with a single color.
|
|
void | epd_bw_spi_fill_pixels (epd_bw_spi_t *dev, uint8_t x1, uint8_t x2, uint16_t y1, uint16_t y2, uint8_t *px) |
| Fill an area with an array of pixels.
|
|
void | epd_bw_spi_set_area (epd_bw_spi_t *dev, uint8_t x1, uint8_t x2, uint16_t y1, uint16_t y2) |
| Set the area in which can be drawn.
|
|
void | epd_bw_spi_write_buffer (epd_bw_spi_t *dev, const uint8_t *buf, size_t len) |
| Write to the RAM of the epd_bw_spi controller.
|
|
void | epd_bw_spi_sleep (epd_bw_spi_t *dev) |
| Set the display to deep sleep mode.
|
|
void | epd_bw_spi_wake (epd_bw_spi_t *dev) |
| Wake the device.
|
|
void | epd_bw_spi_swreset (epd_bw_spi_t *dev) |
| Perform a soft reset of the device.
|
|
◆ EPD_BW_SPI_COLOR_BLACK
#define EPD_BW_SPI_COLOR_BLACK (0x00) |
◆ EPD_BW_SPI_COLOR_WHITE
#define EPD_BW_SPI_COLOR_WHITE (0xFF) |
◆ anonymous enum
Additional status codes for black/white SPI e-paper displays.
Definition at line 64 of file epd_bw_spi.h.
◆ epd_bw_spi_entry_mode_t
Data entry mode settings.
This setting affect the automatic increment/decrement of the address counters.
Enumerator |
---|
EPD_BW_SPI_Y_DEC_X_DEC | Y decrement, X decrement.
|
EPD_BW_SPI_Y_DEC_X_INC | Y decrement, X increment.
|
EPD_BW_SPI_Y_INC_X_DEC | Y increment, X decrement.
|
EPD_BW_SPI_Y_INC_X_INC | Y increment, X increment.
|
Definition at line 54 of file epd_bw_spi.h.
◆ epd_bw_spi_activate()
Activate the display.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_clear()
Clear the entire display.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_deactivate()
Deactivate the display.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_fill()
void epd_bw_spi_fill |
( |
epd_bw_spi_t * |
dev, |
|
|
uint8_t |
x1, |
|
|
uint8_t |
x2, |
|
|
uint16_t |
y1, |
|
|
uint16_t |
y2, |
|
|
uint8_t |
color |
|
) |
| |
Fill an area with a single color.
- Parameters
-
[in] | dev | Device descriptor |
[in] | x1 | X coordinate of the first corner (multiple of 8). |
[in] | x2 | X coordinate of the opposite corner (multiple of 8). |
[in] | y1 | Y coordinate of the first corner. |
[in] | y2 | Y coordinate of the opposite corner. |
[in] | color | Color to use (EPD_BW_SPI_COLOR_BLACK or EPD_BW_SPI_COLOR_WHITE ) |
◆ epd_bw_spi_fill_pixels()
void epd_bw_spi_fill_pixels |
( |
epd_bw_spi_t * |
dev, |
|
|
uint8_t |
x1, |
|
|
uint8_t |
x2, |
|
|
uint16_t |
y1, |
|
|
uint16_t |
y2, |
|
|
uint8_t * |
px |
|
) |
| |
Fill an area with an array of pixels.
Note that the length of the array should be the same as the number of pixels in the given area.
- Parameters
-
[in] | dev | Device descriptor. |
[in] | x1 | X coordinate of the first corner (multiple of 8). |
[in] | x2 | X coordinate of the opposite corner (multiple of 8). |
[in] | y1 | Y coordinate of the first corner. |
[in] | y2 | Y coordinate of the opposite corner. |
[in] | px | Array of pixels to use. |
◆ epd_bw_spi_init()
Initialise the display.
- Parameters
-
[out] | dev | Display to initialise. |
[in] | params | SPI Display parameters to use for initialisation. |
◆ epd_bw_spi_init_auto()
Initialise the display for an automatic partial/full refresh.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_init_full()
Initialise the display for a full refresh.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_init_part()
Initialise the display for a partial refresh.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_set_area()
void epd_bw_spi_set_area |
( |
epd_bw_spi_t * |
dev, |
|
|
uint8_t |
x1, |
|
|
uint8_t |
x2, |
|
|
uint16_t |
y1, |
|
|
uint16_t |
y2 |
|
) |
| |
Set the area in which can be drawn.
- Parameters
-
[in] | dev | Device descriptor. |
[in] | x1 | X coordinate of the first corner (multiple of 8). |
[in] | x2 | X coordinate of the opposite corner (multiple of 8). |
[in] | y1 | Y coordinate of the first corner. |
[in] | y2 | Y coordinate of the opposite corner. |
◆ epd_bw_spi_sleep()
Set the display to deep sleep mode.
After the display has gone to sleep, a wake can be triggered with the reset pin. Do not use this if no reset pin has been defined.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_swreset()
Perform a soft reset of the device.
This resets all commands and parameters to their default values, except for sleep mode and the RAM.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_update_auto()
Update the display with an automatic partial/full refresh.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_update_full()
Update the display with a full refresh.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_update_part()
Update the display with a partial refresh.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_wake()
Wake the device.
This doesn't do anything without using the reset pin.
- Parameters
-
[in] | dev | Device descriptor. |
◆ epd_bw_spi_write_buffer()
void epd_bw_spi_write_buffer |
( |
epd_bw_spi_t * |
dev, |
|
|
const uint8_t * |
buf, |
|
|
size_t |
len |
|
) |
| |
Write to the RAM of the epd_bw_spi controller.
Together with epd_bw_spi_set_area()
, this allows one to draw a pregenerated image on the screen.
- Parameters
-
[in] | dev | Device descriptor. |
[in] | buf | Buffer to write to the display. |
[in] | len | Size of the buffer to write to the display. |