PebbleOS v4.47.0-512-g5285d4236
Loading...
Searching...
No Matches
Sharp LS013B7DH01

Display driver for the Sharp LS013B7DH01 memory LCD, an SPI device. More...

Data Structures

struct  pbl_display_sharp_ls013b7dh01
 Sharp LS013B7DH01 display. More...
 

Macros

#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.
 

Detailed Description

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.

PBL_DISPLAY_SHARP_LS013B7DH01_DEFINE(s_display, "display", &s_spi3, 0, 1000000,
PBL_GPIO(&dt_gpio0, 4, 0), 0,
PBL_PWM(&s_extcomin, 0, PBL_PWM_HZ(120), 0));
#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

Data Structure Documentation

◆ 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.

Macro Definition Documentation

◆ 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; \
PBL_DEVICE_INSTANCE(sym, struct pbl_display_sharp_ls013b7dh01, struct pbl_display, disp) { \
.disp = PBL_DISPLAY_INIT(sym, _name, nullptr, &pbl_display_sharp_ls013b7dh01_ops, \
PBL_DISPLAY_FORMAT_MONO, (_rotation) == 180), \
.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
symSymbol of the display.
_nameName.
_busSPI bus.
_csChip select number.
_max_hzClock frequency, in Hz.
_modeSPI mode flags, PBL_SPI_*.
_enableDISP input, from PBL_GPIO().
_rotationPanel rotation, 0 or 180 degrees.
...EXTCOMIN output, from PBL_PWM(), at twice the VCOM frequency.

◆ SHARP_LS013B7DH01_HEIGHT

#define SHARP_LS013B7DH01_HEIGHT   168

Height, in pixels.

◆ SHARP_LS013B7DH01_WIDTH

#define SHARP_LS013B7DH01_WIDTH   144

Width, in pixels.