Loading...
Searching...
No Matches

Device driver implementation for the epd_bw_spi display controller. More...

Detailed Description

Device driver implementation for the epd_bw_spi display controller.

Author
Silke Hofstra silke.nosp@m.@slx.nosp@m.h.eu

Definition in file epd_bw_spi_internal.h.

Go to the source code of this file.

EPD_BW_SPI SPI commands

Commands used for controlling EPD displays.

These are surprisingly portable.

#define EPD_BW_SPI_CMD_DRIVER_OUTPUT_CONTROL   (0x01)
 
#define EPD_BW_SPI_CMD_GATE_DRIVING_VOLTAGE_CONTROL   (0x03) /* unused */
 
#define EPD_BW_SPI_CMD_SOURCE_DRIVING_VOLTAGE_CONTROL   (0x04) /* unused */
 
#define EPD_BW_SPI_CMD_DISPLAY_CONTROL   (0x07) /* unused */
 
#define EPD_BW_SPI_CMD_GATE_AND_SOURCE_NON_OVERLAP_PERIOD_CONTROL   (0x0B) /* unused */
 
#define EPD_BW_SPI_CMD_BOOSTER_SOFT_START_CONTROL   (0x0C)
 
#define EPD_BW_SPI_CMD_GATE_SCAN_START_POSITION   (0x0F) /* unused */
 
#define EPD_BW_SPI_CMD_DEEP_SLEEP_MODE   (0x10)
 
#define EPD_BW_SPI_CMD_DATA_ENTRY_MODE_SETTING   (0x11)
 
#define EPD_BW_SPI_CMD_SWRESET   (0x12)
 
#define EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_WRITE   (0x1A) /* unused */
 
#define EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_READ   (0x1B) /* unused */
 
#define EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_WRITE_CMD   (0x1C) /* unused */
 
#define EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_LOAD   (0x1D) /* unused */
 
#define EPD_BW_SPI_CMD_MASTER_ACTIVATION   (0x20)
 
#define EPD_BW_SPI_CMD_DISPLAY_UPDATE_CONTROL_1   (0x21) /* unused */
 
#define EPD_BW_SPI_CMD_DISPLAY_UPDATE_CONTROL_2   (0x22)
 
#define EPD_BW_SPI_CMD_WRITE_RAM   (0x24)
 
#define EPD_BW_SPI_CMD_READ_RAM   (0x25) /* unused */
 
#define EPD_BW_SPI_CMD_VCOM_SENSE   (0x28) /* unused */
 
#define EPD_BW_SPI_CMD_VCOM_SENSE_DURATION   (0x29) /* unused */
 
#define EPD_BW_SPI_CMD_PROGRAM_VCOM_OTP   (0x2A) /* unused */
 
#define EPD_BW_SPI_CMD_WRITE_VCOM_REGISTER   (0x2C)
 
#define EPD_BW_SPI_CMD_READ_OTP_REGISTERS   (0x2D) /* unused */
 
#define EPD_BW_SPI_CMD_PROGRAM_WS_OTP   (0x30) /* unused */
 
#define EPD_BW_SPI_CMD_WRITE_LUT_REGISTER   (0x32)
 
#define EPD_BW_SPI_CMD_READ_LUT_REGISTER   (0x33) /* unused */
 
#define EPD_BW_SPI_CMD_PROGRAM_OTP_SELECTION   (0x36) /* unused */
 
#define EPD_BW_SPI_CMD_OTP_SELECTION_CONTROL   (0x37) /* unused */
 
#define EPD_BW_SPI_CMD_SET_DUMMY_LINE_PERIOD   (0x3A)
 
#define EPD_BW_SPI_CMD_SET_GATE_LINE_WIDTH   (0x3B)
 
#define EPD_BW_SPI_CMD_BORDER_WAVEFORM_CONTROL   (0x3C) /* unused */
 
#define EPD_BW_SPI_CMD_SET_RAM_X   (0x44)
 
#define EPD_BW_SPI_CMD_SET_RAM_Y   (0x45)
 
#define EPD_BW_SPI_CMD_SET_RAM_X_ADDR_COUNTER   (0x4E)
 
#define EPD_BW_SPI_CMD_SET_RAM_Y_ADDR_COUNTER   (0x4F)
 
#define EPD_BW_SPI_CMD_NOP   (0xFF)
 

EPD_BW_SPI display update sequence option flags

Option flags for the EPD_BW_SPI_CMD_DISPLAY_UPDATE_CONTROL_2 command.

The flags are executed in the order documented below.

#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_ENABLE_CLOCK   (1<<7)
 
#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_ENABLE_CP   (1<<6)
 
#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_LOAD_TEMP   (1<<5)
 
#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_LOAD_LUT   (1<<4)
 
#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_INITIAL_DISPLAY   (1<<3)
 
#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_PATTERN_DISPLAY   (1<<2)
 
#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_DISABLE_CP   (1<<1)
 
#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_DISABLE_OSC   (1<<0)
 

EPD_BW_SPI Waiting estimates

Waiting estimates in milliseconds which are used when the busy pin is not available.

#define EPD_BW_SPI_WAIT_UPDATE_FULL   1200
 
#define EPD_BW_SPI_WAIT_UPDATE_PART   300
 
#define EPD_BW_SPI_WAIT_ACTIVATION   80
 
#define EPD_BW_SPI_WAIT_RESET   1
 

Macro Definition Documentation

◆ EPD_BW_SPI_CMD_BOOSTER_SOFT_START_CONTROL

#define EPD_BW_SPI_CMD_BOOSTER_SOFT_START_CONTROL   (0x0C)

Definition at line 39 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_BORDER_WAVEFORM_CONTROL

#define EPD_BW_SPI_CMD_BORDER_WAVEFORM_CONTROL   (0x3C) /* unused */

Definition at line 65 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_DATA_ENTRY_MODE_SETTING

#define EPD_BW_SPI_CMD_DATA_ENTRY_MODE_SETTING   (0x11)

Definition at line 42 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_DEEP_SLEEP_MODE

#define EPD_BW_SPI_CMD_DEEP_SLEEP_MODE   (0x10)

Definition at line 41 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_DISPLAY_CONTROL

#define EPD_BW_SPI_CMD_DISPLAY_CONTROL   (0x07) /* unused */

Definition at line 37 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_DISPLAY_UPDATE_CONTROL_1

#define EPD_BW_SPI_CMD_DISPLAY_UPDATE_CONTROL_1   (0x21) /* unused */

Definition at line 49 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_DISPLAY_UPDATE_CONTROL_2

#define EPD_BW_SPI_CMD_DISPLAY_UPDATE_CONTROL_2   (0x22)

Definition at line 50 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_DRIVER_OUTPUT_CONTROL

#define EPD_BW_SPI_CMD_DRIVER_OUTPUT_CONTROL   (0x01)

Definition at line 34 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_GATE_AND_SOURCE_NON_OVERLAP_PERIOD_CONTROL

#define EPD_BW_SPI_CMD_GATE_AND_SOURCE_NON_OVERLAP_PERIOD_CONTROL   (0x0B) /* unused */

Definition at line 38 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_GATE_DRIVING_VOLTAGE_CONTROL

#define EPD_BW_SPI_CMD_GATE_DRIVING_VOLTAGE_CONTROL   (0x03) /* unused */

Definition at line 35 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_GATE_SCAN_START_POSITION

#define EPD_BW_SPI_CMD_GATE_SCAN_START_POSITION   (0x0F) /* unused */

Definition at line 40 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_MASTER_ACTIVATION

#define EPD_BW_SPI_CMD_MASTER_ACTIVATION   (0x20)

Definition at line 48 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_NOP

#define EPD_BW_SPI_CMD_NOP   (0xFF)

Definition at line 70 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_OTP_SELECTION_CONTROL

#define EPD_BW_SPI_CMD_OTP_SELECTION_CONTROL   (0x37) /* unused */

Definition at line 62 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_PROGRAM_OTP_SELECTION

#define EPD_BW_SPI_CMD_PROGRAM_OTP_SELECTION   (0x36) /* unused */

Definition at line 61 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_PROGRAM_VCOM_OTP

#define EPD_BW_SPI_CMD_PROGRAM_VCOM_OTP   (0x2A) /* unused */

Definition at line 55 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_PROGRAM_WS_OTP

#define EPD_BW_SPI_CMD_PROGRAM_WS_OTP   (0x30) /* unused */

Definition at line 58 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_READ_LUT_REGISTER

#define EPD_BW_SPI_CMD_READ_LUT_REGISTER   (0x33) /* unused */

Definition at line 60 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_READ_OTP_REGISTERS

#define EPD_BW_SPI_CMD_READ_OTP_REGISTERS   (0x2D) /* unused */

Definition at line 57 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_READ_RAM

#define EPD_BW_SPI_CMD_READ_RAM   (0x25) /* unused */

Definition at line 52 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_SET_DUMMY_LINE_PERIOD

#define EPD_BW_SPI_CMD_SET_DUMMY_LINE_PERIOD   (0x3A)

Definition at line 63 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_SET_GATE_LINE_WIDTH

#define EPD_BW_SPI_CMD_SET_GATE_LINE_WIDTH   (0x3B)

Definition at line 64 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_SET_RAM_X

#define EPD_BW_SPI_CMD_SET_RAM_X   (0x44)

Definition at line 66 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_SET_RAM_X_ADDR_COUNTER

#define EPD_BW_SPI_CMD_SET_RAM_X_ADDR_COUNTER   (0x4E)

Definition at line 68 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_SET_RAM_Y

#define EPD_BW_SPI_CMD_SET_RAM_Y   (0x45)

Definition at line 67 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_SET_RAM_Y_ADDR_COUNTER

#define EPD_BW_SPI_CMD_SET_RAM_Y_ADDR_COUNTER   (0x4F)

Definition at line 69 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_SOURCE_DRIVING_VOLTAGE_CONTROL

#define EPD_BW_SPI_CMD_SOURCE_DRIVING_VOLTAGE_CONTROL   (0x04) /* unused */

Definition at line 36 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_SWRESET

#define EPD_BW_SPI_CMD_SWRESET   (0x12)

Definition at line 43 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_LOAD

#define EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_LOAD   (0x1D) /* unused */

Definition at line 47 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_READ

#define EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_READ   (0x1B) /* unused */

Definition at line 45 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_WRITE

#define EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_WRITE   (0x1A) /* unused */

Definition at line 44 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_WRITE_CMD

#define EPD_BW_SPI_CMD_TEMPERATURE_SENSOR_CONTROL_WRITE_CMD   (0x1C) /* unused */

Definition at line 46 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_VCOM_SENSE

#define EPD_BW_SPI_CMD_VCOM_SENSE   (0x28) /* unused */

Definition at line 53 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_VCOM_SENSE_DURATION

#define EPD_BW_SPI_CMD_VCOM_SENSE_DURATION   (0x29) /* unused */

Definition at line 54 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_WRITE_LUT_REGISTER

#define EPD_BW_SPI_CMD_WRITE_LUT_REGISTER   (0x32)

Definition at line 59 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_WRITE_RAM

#define EPD_BW_SPI_CMD_WRITE_RAM   (0x24)

Definition at line 51 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_CMD_WRITE_VCOM_REGISTER

#define EPD_BW_SPI_CMD_WRITE_VCOM_REGISTER   (0x2C)

Definition at line 56 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_DISPLAY_UPDATE_OPTION_DISABLE_CP

#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_DISABLE_CP   (1<<1)

Definition at line 85 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_DISPLAY_UPDATE_OPTION_DISABLE_OSC

#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_DISABLE_OSC   (1<<0)

Definition at line 86 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_DISPLAY_UPDATE_OPTION_ENABLE_CLOCK

#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_ENABLE_CLOCK   (1<<7)

Definition at line 79 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_DISPLAY_UPDATE_OPTION_ENABLE_CP

#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_ENABLE_CP   (1<<6)

Definition at line 80 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_DISPLAY_UPDATE_OPTION_INITIAL_DISPLAY

#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_INITIAL_DISPLAY   (1<<3)

Definition at line 83 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_DISPLAY_UPDATE_OPTION_LOAD_LUT

#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_LOAD_LUT   (1<<4)

Definition at line 82 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_DISPLAY_UPDATE_OPTION_LOAD_TEMP

#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_LOAD_TEMP   (1<<5)

Definition at line 81 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_DISPLAY_UPDATE_OPTION_PATTERN_DISPLAY

#define EPD_BW_SPI_DISPLAY_UPDATE_OPTION_PATTERN_DISPLAY   (1<<2)

Definition at line 84 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_WAIT_ACTIVATION

#define EPD_BW_SPI_WAIT_ACTIVATION   80

Definition at line 96 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_WAIT_RESET

#define EPD_BW_SPI_WAIT_RESET   1

Definition at line 97 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_WAIT_UPDATE_FULL

#define EPD_BW_SPI_WAIT_UPDATE_FULL   1200

Definition at line 94 of file epd_bw_spi_internal.h.

◆ EPD_BW_SPI_WAIT_UPDATE_PART

#define EPD_BW_SPI_WAIT_UPDATE_PART   300

Definition at line 95 of file epd_bw_spi_internal.h.