SH1106 port initial.
This commit is contained in:
parent
546504f14c
commit
1bd56d34aa
2 changed files with 159 additions and 35 deletions
|
|
@ -26,6 +26,17 @@ extern "C"
|
|||
{
|
||||
#endif
|
||||
|
||||
/**
|
||||
* SH1106 pump voltage value
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SH1106_VOLTAGE_74 = 0, // 7.4 Volt
|
||||
SH1106_VOLTAGE_80, // 8.0 Volt
|
||||
SH1106_VOLTAGE_84, // 8.4 Volt
|
||||
SH1106_VOLTAGE_90 // 9.0 Volt
|
||||
} sh1106_voltage_t;
|
||||
|
||||
/**
|
||||
* I/O protocols
|
||||
*/
|
||||
|
|
@ -36,12 +47,22 @@ typedef enum
|
|||
SSD1306_PROTO_SPI3 //!< SPI 9 bits
|
||||
} ssd1306_protocol_t;
|
||||
|
||||
/**
|
||||
* Screen type
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SSD1306_SCREEN = 0,
|
||||
SH1106_SCREEN
|
||||
} ssd1306_screen_t;
|
||||
|
||||
/**
|
||||
* Device descriptor
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
ssd1306_protocol_t protocol;
|
||||
ssd1306_screen_t screen ;
|
||||
union {
|
||||
#if (SSD1306_I2C_SUPPORT)
|
||||
uint8_t addr ; //!< I2C address, used by SSD1306_PROTO_I2C
|
||||
|
|
@ -134,6 +155,14 @@ int ssd1306_set_display_start_line(const ssd1306_t *dev, uint8_t start);
|
|||
*/
|
||||
int ssd1306_set_display_offset(const ssd1306_t *dev, uint8_t offset);
|
||||
|
||||
/**
|
||||
* Select charge pump voltage. See value in datasheet.
|
||||
* @param dev Pointer to device descriptor
|
||||
* @param select Select charge pump voltage value
|
||||
* @return Non-zero if error occured
|
||||
*/
|
||||
int sh1106_set_charge_pump_voltage(const ssd1306_t *dev, sh1106_voltage_t select);
|
||||
|
||||
/**
|
||||
* Enable or disable the charge pump. See application note in datasheet.
|
||||
* @param dev Pointer to device descriptor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue