UC8151 e-paper display driver interface for monochrome displays.
More...
|
driver_uc8151_t | driver_uc8151_init (hw_spi_t *spi, uint8_t dc_pin, uint8_t reset_pin, uint8_t busy_pin, uint16_t width, uint16_t height) |
| Initialize a UC8151 display driver using the SPI interface. More...
|
|
void | driver_uc8151_finalize (driver_uc8151_t *uc8151) |
| Finalize and release a UC8151 display driver. More...
|
|
static bool | driver_uc8151_valid (driver_uc8151_t *uc8151) |
| Check if a UC8151 driver structure is valid. More...
|
|
bool | driver_uc8151_set_update_speed (driver_uc8151_t *uc8151, driver_uc8151_update_speed_t speed) |
| Set the update speed of the UC8151 display. More...
|
|
bool | driver_uc8151_set_rotation (driver_uc8151_t *uc8151, driver_uc8151_rotation_t rotation) |
| Set the rotation of the UC8151 display. More...
|
|
bool | driver_uc8151_set_inverted (driver_uc8151_t *uc8151, bool inverted) |
| Set the color inversion of the UC8151 display. More...
|
|
bool | driver_uc8151_set_blocking (driver_uc8151_t *uc8151, bool blocking) |
| Set the blocking mode of the UC8151 display. More...
|
|
uint32_t | driver_uc8151_get_update_time (driver_uc8151_t *uc8151) |
| Get the estimated update time for the current speed setting. More...
|
|
bool | driver_uc8151_is_busy (driver_uc8151_t *uc8151) |
| Check if the UC8151 display is busy. More...
|
|
void | driver_uc8151_busy_wait (driver_uc8151_t *uc8151) |
| Wait for the UC8151 display to become ready. More...
|
|
void | driver_uc8151_reset (driver_uc8151_t *uc8151) |
| Reset the UC8151 display. More...
|
|
void | driver_uc8151_power_off (driver_uc8151_t *uc8151) |
| Turn off the UC8151 display. More...
|
|
bool | driver_uc8151_update (driver_uc8151_t *uc8151, const void *data, size_t size) |
| Update the entire UC8151 display with new framebuffer data. More...
|
|
bool | driver_uc8151_partial_update (driver_uc8151_t *uc8151, const uint8_t *data, size_t size, driver_uc8151_rect_t rect) |
| Update a partial region of the UC8151 display. More...
|
|
UC8151 e-paper display driver interface for monochrome displays.
The UC8151 is a popular e-paper display controller used in various e-ink displays, supporting partial and full updates with different refresh speeds.
◆ driver_uc8151_t
UC8151 display driver structure.
This structure contains the configuration and state information for a UC8151 e-paper display controller instance. The UC8151 supports various update speeds and partial refresh capabilities.
◆ driver_uc8151_rotation_t
UC8151 rotation modes.
Enumerator |
---|
DRIVER_UC8151_ROTATION_0 | No rotation.
|
DRIVER_UC8151_ROTATION_180 | 180-degree rotation
|
Definition at line 35 of file drivers_uc8151.h.
driver_uc8151_rotation_t
UC8151 rotation modes.
◆ driver_uc8151_update_speed_t
UC8151 update speed modes.
Enumerator |
---|
DRIVER_UC8151_UPDATE_SPEED_DEFAULT | Default speed (~4.5s)
|
DRIVER_UC8151_UPDATE_SPEED_MEDIUM | Medium speed (~2s)
|
DRIVER_UC8151_UPDATE_SPEED_FAST | Fast speed (~0.8s)
|
DRIVER_UC8151_UPDATE_SPEED_TURBO | Turbo speed (~0.25s)
|
Definition at line 24 of file drivers_uc8151.h.
driver_uc8151_update_speed_t
UC8151 update speed modes.
◆ driver_uc8151_busy_wait()
Wait for the UC8151 display to become ready.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
◆ driver_uc8151_finalize()
Finalize and release a UC8151 display driver.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure to finalize. |
This function releases resources associated with the UC8151 display driver and puts the display into a low-power state.
◆ driver_uc8151_get_update_time()
Get the estimated update time for the current speed setting.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
- Returns
- Estimated update time in milliseconds.
◆ driver_uc8151_init()
driver_uc8151_t driver_uc8151_init |
( |
hw_spi_t * |
spi, |
|
|
uint8_t |
dc_pin, |
|
|
uint8_t |
reset_pin, |
|
|
uint8_t |
busy_pin, |
|
|
uint16_t |
width, |
|
|
uint16_t |
height |
|
) |
| |
Initialize a UC8151 display driver using the SPI interface.
- Parameters
-
spi | Pointer to an initialized SPI interface for display communication. |
dc_pin | GPIO pin number for Data/Command control. |
reset_pin | GPIO pin number for display reset. |
busy_pin | GPIO pin number for busy status. |
width | Display width in pixels. |
height | Display height in pixels. |
- Returns
- A UC8151 driver structure representing the initialized display.
This function initializes a UC8151 e-paper display driver for communication over SPI. The display requires several control pins and supports various resolutions.
- Note
- The spi pointer must be valid and the SPI interface must be properly initialized with appropriate speed and mode.
- See also
- hw_spi_init() for SPI interface initialization.
-
driver_uc8151_finalize() for cleanup and resource release.
◆ driver_uc8151_is_busy()
Check if the UC8151 display is busy.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
- Returns
- True if the display is busy, false if ready.
◆ driver_uc8151_partial_update()
Update a partial region of the UC8151 display.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
data | Pointer to the framebuffer data. |
size | Size of the framebuffer in bytes. |
rect | Region to update. |
- Returns
- True if the partial update was initiated successfully, false otherwise.
◆ driver_uc8151_power_off()
Turn off the UC8151 display.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
◆ driver_uc8151_reset()
Reset the UC8151 display.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
◆ driver_uc8151_set_blocking()
bool driver_uc8151_set_blocking |
( |
driver_uc8151_t * |
uc8151, |
|
|
bool |
blocking |
|
) |
| |
Set the blocking mode of the UC8151 display.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
blocking | True to enable blocking mode, false for non-blocking. |
- Returns
- True if the blocking mode was set successfully, false otherwise.
◆ driver_uc8151_set_inverted()
bool driver_uc8151_set_inverted |
( |
driver_uc8151_t * |
uc8151, |
|
|
bool |
inverted |
|
) |
| |
Set the color inversion of the UC8151 display.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
inverted | True to invert colors, false for normal colors. |
- Returns
- True if the inversion was set successfully, false otherwise.
◆ driver_uc8151_set_rotation()
Set the rotation of the UC8151 display.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
rotation | Rotation mode. |
- Returns
- True if the rotation was set successfully, false otherwise.
◆ driver_uc8151_set_update_speed()
Set the update speed of the UC8151 display.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
speed | Update speed mode. |
- Returns
- True if the speed was set successfully, false otherwise.
◆ driver_uc8151_update()
bool driver_uc8151_update |
( |
driver_uc8151_t * |
uc8151, |
|
|
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
Update the entire UC8151 display with new framebuffer data.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure. |
data | Pointer to the framebuffer data. |
size | Size of the framebuffer in bytes. |
- Returns
- True if the update was initiated successfully, false otherwise.
◆ driver_uc8151_valid()
Check if a UC8151 driver structure is valid.
- Parameters
-
uc8151 | Pointer to the UC8151 driver structure to validate. |
- Returns
- True if the driver structure is valid, false otherwise.
Definition at line 119 of file drivers_uc8151.h.
uint16_t height
Display height in pixels.
uint16_t width
Display width in pixels.
hw_spi_t * spi
Pointer to the SPI interface.
static bool hw_spi_valid(hw_spi_t *spi)
Get true if the SPI interface is valid.