Graphic Display v1.0.0
Control any mochrome display, with any microcontroller, in any amount.
Loading...
Searching...
No Matches
st7920_params_t Struct Reference

Struct to initialize and configure the driver to control the ST7920 peripheral. More...

#include <st7920.h>

Data Fields

st7920_mode_e Mode
 Configures the Mode of the ST7920. This driver can work on 4bit, 8bit or SPI mode.
 
uint32_t u32Width
 Configure the Width of the display.
 
uint32_t u32Heigth
 Configure the Height of the display.
 
bool bUseExternalFrameBuffer
 Sets to true to provide a external FrameBuffer array. The size of array must be calculated with the formula Width*Height/8. If false, the library will allocate the array in Initialization.
 
fxnDelay_ms delayMs
 Pointer to delay milliseconds routine.
 
fxn7920_mtxLock mtxLock
 Pointer to mutex lock. If not used, sets to NULL.
 
fxn7920_mtxunlock mtxUnlock
 Pointer to mutex unlock. If not used, sets to NULL.
 
fxn1306spi_cs spiCs
 Pointer to Chip Select controller routine.
 
fxn1306spi_reset spiReset
 Pointer to Reset controller routine.
 
fxn1306spi_write spiWrite
 Pointer to spi controller routine.
 

Detailed Description

Struct to initialize and configure the driver to control the ST7920 peripheral.

Field Documentation

◆ bUseExternalFrameBuffer

bool st7920_params_t::bUseExternalFrameBuffer

Sets to true to provide a external FrameBuffer array. The size of array must be calculated with the formula Width*Height/8. If false, the library will allocate the array in Initialization.

Note
To provide the buffer, use ST7920_SetFrameBuffer routine to provide the array.

◆ delayMs

fxnDelay_ms st7920_params_t::delayMs

Pointer to delay milliseconds routine.

◆ Mode

st7920_mode_e st7920_params_t::Mode

Configures the Mode of the ST7920. This driver can work on 4bit, 8bit or SPI mode.

Note
Only ST7920_MODE_SPI is implemented. Other values will assert the program.

◆ mtxLock

fxn7920_mtxLock st7920_params_t::mtxLock

Pointer to mutex lock. If not used, sets to NULL.

◆ mtxUnlock

fxn7920_mtxunlock st7920_params_t::mtxUnlock

Pointer to mutex unlock. If not used, sets to NULL.

◆ spiCs

fxn1306spi_cs st7920_params_t::spiCs

Pointer to Chip Select controller routine.

Note
Mandatory when display is on ST7920_MODE_SPI.

◆ spiReset

fxn1306spi_reset st7920_params_t::spiReset

Pointer to Reset controller routine.

Note
Mandatory when display is on ST7920_MODE_SPI.

◆ spiWrite

fxn1306spi_write st7920_params_t::spiWrite

Pointer to spi controller routine.

Precondition
Configure the SPI Peripheral in Mode 1 (CPOL=0 and CPHA=1).
Note
Mandatory when display is on ST7920_MODE_SPI.

◆ u32Heigth

uint32_t st7920_params_t::u32Heigth

Configure the Height of the display.

◆ u32Width

uint32_t st7920_params_t::u32Width

Configure the Width of the display.


The documentation for this struct was generated from the following file: