Graphic Display v1.0.0
Control any mochrome display, with any microcontroller, in any amount.
Loading...
Searching...
No Matches
st7920.c File Reference
#include "st7920.h"

Macros

#define _PIN_HIGH   1
 
#define _PIN_LOW   0
 
#define _SUCCESS   0
 
#define _ST7920_ERROR_CHECK(x)   if (x != _SUCCESS) { return ST7920_FAIL; }
 

Functions

static void _delay_ms (st7920_t *st7920, uint32_t ms)
 
static void _pin_reset (st7920_t *st7920, uint8_t Signal)
 
static void _pin_cs (st7920_t *st7920, uint8_t Signal)
 
static uint8_t _spi_write (st7920_t *st7920, uint8_t *data, uint32_t len)
 
static uint8_t _write_data (st7920_t *st7920, uint8_t *buff, uint32_t len)
 
static uint8_t _write_command (st7920_t *st7920, uint8_t cmd)
 
static void _reset (st7920_t *st7920)
 
static void _mtx_lock (st7920_t *st7920)
 
static void _mtx_unlock (st7920_t *st7920)
 
uint8_t ST7920_Init (st7920_t *st7920, st7920_params_t *params)
 
uint8_t ST7920_SetFrameBuffer (st7920_t *st7920, uint8_t *pu8FrameBuffer)
 
uint8_t ST7920_Refresh (st7920_t *st7920)
 
uint8_t ST7920_Write (st7920_t *st7920, uint32_t x, uint32_t y, bool color)
 
uint8_t ST7920_Fill (st7920_t *st7920, uint8_t color)
 

Macro Definition Documentation

◆ _PIN_HIGH

#define _PIN_HIGH   1

◆ _PIN_LOW

#define _PIN_LOW   0

◆ _ST7920_ERROR_CHECK

#define _ST7920_ERROR_CHECK ( x)    if (x != _SUCCESS) { return ST7920_FAIL; }

◆ _SUCCESS

#define _SUCCESS   0

Function Documentation

◆ _delay_ms()

static void _delay_ms ( st7920_t * st7920,
uint32_t ms )
static

◆ _mtx_lock()

static void _mtx_lock ( st7920_t * st7920)
static

◆ _mtx_unlock()

static void _mtx_unlock ( st7920_t * st7920)
static

◆ _pin_cs()

static void _pin_cs ( st7920_t * st7920,
uint8_t Signal )
static

◆ _pin_reset()

static void _pin_reset ( st7920_t * st7920,
uint8_t Signal )
static

◆ _reset()

static void _reset ( st7920_t * st7920)
static

◆ _spi_write()

static uint8_t _spi_write ( st7920_t * st7920,
uint8_t * data,
uint32_t len )
static

◆ _write_command()

static uint8_t _write_command ( st7920_t * st7920,
uint8_t cmd )
static

◆ _write_data()

static uint8_t _write_data ( st7920_t * st7920,
uint8_t * buff,
uint32_t len )
static

◆ ST7920_Fill()

uint8_t ST7920_Fill ( st7920_t * st7920,
uint8_t color )
Parameters
st7920
color
Returns
uint8_t

◆ ST7920_Init()

uint8_t ST7920_Init ( st7920_t * st7920,
st7920_params_t * params )
Parameters
st7920
params
Returns
uint8_t

◆ ST7920_Refresh()

uint8_t ST7920_Refresh ( st7920_t * st7920)
Parameters
st7920
Returns
uint8_t

◆ ST7920_SetFrameBuffer()

uint8_t ST7920_SetFrameBuffer ( st7920_t * st7920,
uint8_t * pu8FrameBuffer )
Parameters
st7920
pu8FrameBuffer
Returns
uint8_t

◆ ST7920_Write()

uint8_t ST7920_Write ( st7920_t * st7920,
uint32_t x,
uint32_t y,
bool color )
Parameters
st7920
x
y
color
Returns
uint8_t