Display driver for the Sharp LS013B7DH01 memory LCD, an SPI device.
More...
|
| #define | SHARP_LS013B7DH01_WIDTH 144 |
| | Width, in pixels.
|
| |
| #define | SHARP_LS013B7DH01_HEIGHT 168 |
| | Height, in pixels.
|
| |
| #define | PBL_DISPLAY_SHARP_LS013B7DH01_DEFINE(sym, _name, _bus, _cs, _max_hz, _mode, _enable, _rotation, ...) |
| | Define a Sharp LS013B7DH01 display.
|
| |
Display driver for the Sharp LS013B7DH01 memory LCD, an SPI device.
The 144x168 panel keeps its image in pixel memory and takes PBL_DISPLAY_FORMAT_MONO rows over SPI, least significant bit first, with an active-high chip select. Its VCOM is inverted on the rising edges of EXTCOMIN, driven by a PWM output while the panel is on. Updates complete from the SPI controller's interrupt.
#define PBL_DISPLAY_SHARP_LS013B7DH01_DEFINE(sym, _name, _bus, _cs, _max_hz, _mode, _enable, _rotation,...)
Define a Sharp LS013B7DH01 display.
Definition sharp_ls013b7dh01.h:79
#define PBL_GPIO(_port, _pin, _flags)
Initializer for a struct pbl_gpio.
Definition gpio.h:158
#define PBL_PWM_HZ(hz)
Period of a hz Hz output, in nanoseconds.
Definition pwm.h:51
#define PBL_PWM(_ctrl, _channel, _period, _flags)
Initializer for a struct pbl_pwm.
Definition pwm.h:96
#define PBL_SPI_LSB_FIRST
Send the least significant bit of each byte first.
Definition spi.h:72
#define PBL_SPI_CS_HIGH
Chip select is active high.
Definition spi.h:70
#define PBL_SPI_MODE_0
Mode 0: clock idles low, sample on the leading edge.
Definition spi.h:62
◆ pbl_display_sharp_ls013b7dh01
| struct pbl_display_sharp_ls013b7dh01 |
Sharp LS013B7DH01 display.
| Data Fields |
|
struct pbl_display |
disp |
Display. |
|
struct pbl_gpio |
enable |
DISP input, turning the image on. |
|
struct pbl_pwm |
extcomin |
EXTCOMIN output. |
|
struct pbl_spi_dev |
spi |
SPI device. |
|
struct pbl_display_sharp_ls013b7dh01_state * |
state |
Driver runtime state. |
◆ PBL_DISPLAY_SHARP_LS013B7DH01_DEFINE
| #define PBL_DISPLAY_SHARP_LS013B7DH01_DEFINE |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_bus, |
|
|
|
_cs, |
|
|
|
_max_hz, |
|
|
|
_mode, |
|
|
|
_enable, |
|
|
|
_rotation, |
|
|
|
... |
|
) |
| |
Value: static_assert((_rotation) == 0 || (_rotation) == 180, "rotation of 0 or 180 degrees"); \
PBL_DISPLAY_STATE_DEFINE(sym); \
static struct pbl_display_sharp_ls013b7dh01_state sym##_sharp_state; \
.disp =
PBL_DISPLAY_INIT(sym, _name,
nullptr, &pbl_display_sharp_ls013b7dh01_ops, \
.state = &sym##_sharp_state, .spi =
PBL_SPI_DEV(_bus, _cs, _max_hz, _mode), .enable = _enable, \
.extcomin = __VA_ARGS__, \
}
Sharp LS013B7DH01 display.
Definition sharp_ls013b7dh01.h:49
#define SHARP_LS013B7DH01_WIDTH
Width, in pixels.
Definition sharp_ls013b7dh01.h:34
#define SHARP_LS013B7DH01_HEIGHT
Height, in pixels.
Definition sharp_ls013b7dh01.h:36
A display.
Definition display.h:134
#define PBL_DISPLAY_INIT(sym, _name, _parent, _ops, _width, _height, _format, _rotated,...)
Initializer for the struct pbl_display of display sym.
Definition display.h:236
@ PBL_DISPLAY_FORMAT_MONO
1 bit per pixel, leftmost pixel in the least significant bit, set for white.
Definition display.h:50
#define PBL_SPI_DEV(_bus, _cs, _max_hz, _mode)
Initializer for a struct pbl_spi_dev.
Definition spi.h:173
Define a Sharp LS013B7DH01 display.
- Parameters
-
| sym | Symbol of the display. |
| _name | Name. |
| _bus | SPI bus. |
| _cs | Chip select number. |
| _max_hz | Clock frequency, in Hz. |
| _mode | SPI mode flags, PBL_SPI_*. |
| _enable | DISP input, from PBL_GPIO(). |
| _rotation | Panel rotation, 0 or 180 degrees. |
| ... | EXTCOMIN output, from PBL_PWM(), at twice the VCOM frequency. |
◆ SHARP_LS013B7DH01_HEIGHT
| #define SHARP_LS013B7DH01_HEIGHT 168 |
◆ SHARP_LS013B7DH01_WIDTH
| #define SHARP_LS013B7DH01_WIDTH 144 |