px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
px_lcd_st7567_jhd12864.h : JHD JHD12864-G176BSW 128x64 monochrome LCD wtih Sitronix ST7567 driver

Description

File(s):

Macros

#define PX_LCD_MAX_SPI_CLOCK_HZ   20000000ul
 Maximum PX_SPI Clock rate. More...
 
#define PX_LCD_SPI_MODE   PX_SPI_MODE3
 PX_SPI Clock / Data phase. More...
 
#define PX_LCD_SPI_DATA_ORDER   PX_SPI_DATA_ORDER_MSB
 PX_SPI Data order. More...
 
#define PX_LCD_NR_OF_COLS   128
 Number of columns. More...
 
#define PX_LCD_NR_OF_ROWS   64
 Number of rows. More...
 
#define PX_LCD_NR_OF_PAGES   (PX_LCD_NR_OF_ROWS / 8)
 Number of pages. More...
 
#define PX_LCD_CFG_RST_LO()   px_gpio_out_set_lo(&px_gpio_lcd_rst)
 Macro to set LCD reset pin low. More...
 
#define PX_LCD_CFG_RST_HI()   px_gpio_out_set_hi(&px_gpio_lcd_rst)
 Macro to set LCD reset pin high. More...
 
#define PX_LCD_CFG_RS_LO()   px_gpio_out_set_lo(&px_gpio_lcd_rs)
 Macro to set RS pin low. More...
 
#define PX_LCD_CFG_RS_HI()   px_gpio_out_set_hi(&px_gpio_lcd_rs)
 Macro to set RS pin high. More...
 
#define PX_LCD_CFG_ROT_180_DEG   1
 Configuration option to rotate mapping of LCD by 180 degrees. More...
 

Functions

void px_lcd_init (px_spi_handle_t *handle)
 Initialise LCD driver. More...
 
void px_lcd_power_save_on (void)
 Turn power save on. More...
 
void px_lcd_power_save_off (void)
 Turn power save off. More...
 
void px_lcd_clr (void)
 Clear LCD display. More...
 
void px_lcd_sel_page (uint8_t page)
 Select LCD page (y) for display data. More...
 
void px_lcd_sel_col (uint8_t col)
 Select LCD starting column (x) for display data. More...
 
void px_lcd_wr_disp_u8 (uint8_t data)
 Write one byte of display data. More...
 
void px_lcd_wr_disp_data (uint8_t *data, size_t nr_of_bytes)
 Write data to display. More...
 

Macro Definition Documentation

◆ PX_LCD_MAX_SPI_CLOCK_HZ

#define PX_LCD_MAX_SPI_CLOCK_HZ   20000000ul

Maximum PX_SPI Clock rate.

Definition at line 53 of file px_lcd_st7567_jhd12864.h.

◆ PX_LCD_SPI_MODE

#define PX_LCD_SPI_MODE   PX_SPI_MODE3

PX_SPI Clock / Data phase.

Definition at line 55 of file px_lcd_st7567_jhd12864.h.

◆ PX_LCD_SPI_DATA_ORDER

#define PX_LCD_SPI_DATA_ORDER   PX_SPI_DATA_ORDER_MSB

PX_SPI Data order.

Definition at line 57 of file px_lcd_st7567_jhd12864.h.

◆ PX_LCD_NR_OF_COLS

#define PX_LCD_NR_OF_COLS   128

Number of columns.

Definition at line 59 of file px_lcd_st7567_jhd12864.h.

◆ PX_LCD_NR_OF_ROWS

#define PX_LCD_NR_OF_ROWS   64

Number of rows.

Definition at line 61 of file px_lcd_st7567_jhd12864.h.

◆ PX_LCD_NR_OF_PAGES

#define PX_LCD_NR_OF_PAGES   (PX_LCD_NR_OF_ROWS / 8)

Number of pages.

Definition at line 63 of file px_lcd_st7567_jhd12864.h.

◆ PX_LCD_CFG_RST_LO

#define PX_LCD_CFG_RST_LO ( )    px_gpio_out_set_lo(&px_gpio_lcd_rst)

Macro to set LCD reset pin low.

Definition at line 36 of file px_lcd_st7567_jhd12864_cfg_template.h.

◆ PX_LCD_CFG_RST_HI

#define PX_LCD_CFG_RST_HI ( )    px_gpio_out_set_hi(&px_gpio_lcd_rst)

Macro to set LCD reset pin high.

Definition at line 39 of file px_lcd_st7567_jhd12864_cfg_template.h.

◆ PX_LCD_CFG_RS_LO

#define PX_LCD_CFG_RS_LO ( )    px_gpio_out_set_lo(&px_gpio_lcd_rs)

Macro to set RS pin low.

Definition at line 42 of file px_lcd_st7567_jhd12864_cfg_template.h.

◆ PX_LCD_CFG_RS_HI

#define PX_LCD_CFG_RS_HI ( )    px_gpio_out_set_hi(&px_gpio_lcd_rs)

Macro to set RS pin high.

Definition at line 45 of file px_lcd_st7567_jhd12864_cfg_template.h.

◆ PX_LCD_CFG_ROT_180_DEG

#define PX_LCD_CFG_ROT_180_DEG   1

Configuration option to rotate mapping of LCD by 180 degrees.

Definition at line 48 of file px_lcd_st7567_jhd12864_cfg_template.h.

Function Documentation

◆ px_lcd_init()

void px_lcd_init ( px_spi_handle_t handle)

Initialise LCD driver.

Parameters
handlePointer to SPI handle data structure

Definition at line 76 of file px_lcd_st7565p_tse2g0330e.c.

◆ px_lcd_power_save_on()

void px_lcd_power_save_on ( void  )

Turn power save on.

Definition at line 132 of file px_lcd_st7567_jhd12864.c.

◆ px_lcd_power_save_off()

void px_lcd_power_save_off ( void  )

Turn power save off.

Definition at line 140 of file px_lcd_st7567_jhd12864.c.

◆ px_lcd_clr()

void px_lcd_clr ( void  )

Clear LCD display.

Definition at line 119 of file px_lcd_st7565p_tse2g0330e.c.

◆ px_lcd_sel_page()

void px_lcd_sel_page ( uint8_t  page)

Select LCD page (y) for display data.

The LCD is divided up into 8 rows of 128 bytes. Each row is called a page.

Parameters
page0 to (PX_LCD_NR_OF_PAGES - 1)

Definition at line 151 of file px_lcd_st7565p_tse2g0330e.c.

◆ px_lcd_sel_col()

void px_lcd_sel_col ( uint8_t  col)

Select LCD starting column (x) for display data.

The LCD is divided up into 8 rows of 128 bytes. Each byte in the row maps to a column value.

Parameters
col0 to (PX_LCD_NR_OF_COLS - 1)

Definition at line 139 of file px_lcd_st7565p_tse2g0330e.c.

◆ px_lcd_wr_disp_u8()

void px_lcd_wr_disp_u8 ( uint8_t  data)

Write one byte of display data.

The value will be written to the selected page (

See also
px_lcd_sel_page) and selected column (
px_lcd_sel_col).
Parameters
dataValue to write to display

Definition at line 160 of file px_lcd_st7565p_tse2g0330e.c.

◆ px_lcd_wr_disp_data()

void px_lcd_wr_disp_data ( uint8_t *  data,
size_t  nr_of_bytes 
)

Write data to display.

The data will be written to the selected page (

See also
px_lcd_sel_page) and start at the selected column (
px_lcd_sel_col).
Note
If data is written past the end of the column, it will not automatically wrap to the next page.
Parameters
dataPointer to data to write
nr_of_bytesNumber of bytes to write

Definition at line 165 of file px_lcd_st7565p_tse2g0330e.c.