Device driver interface for the DSP0401 alphanumeric display. More...

Detailed Description

Device driver interface for the DSP0401 alphanumeric display.

Files

file  dsp0401_params.h
 Default configuration for DSP0401.
 
file  dsp0401.h
 Device driver interface for the DSP0401 alphanumeric display.
 

Data Structures

struct  dsp0401_params_t
 Device initialization parameters. More...
 
struct  dsp0401_t
 Device descriptor for the DSP0401. More...
 

Enumerations

enum  {
  DSP0401_OK = 0, DSP0401_ERR_CLK_GPIO, DSP0401_ERR_SDI_GPIO, DSP0401_ERR_LAT_GPIO,
  DSP0401_ERR_PWM
}
 Return codes. More...
 

Functions

int dsp0401_init (dsp0401_t *dev, const dsp0401_params_t *params)
 Initialize the given DSP0401. More...
 
void dsp0401_display_text (const dsp0401_t *dev, char *text)
 Display the given text on the DSP0401. More...
 
void dsp0401_clear_text (const dsp0401_t *dev)
 Clear the text displayed on the DSP0401. More...
 
void dsp0401_scroll_text (const dsp0401_t *dev, char *text, uint16_t delay)
 Scroll the given text on the DSP0401. More...
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Return codes.

Enumerator
DSP0401_OK 

All ok.

DSP0401_ERR_CLK_GPIO 

Something went wrong with CLK GPIO.

DSP0401_ERR_SDI_GPIO 

Something went wrong with SDI GPIO.

DSP0401_ERR_LAT_GPIO 

Something went wrong with LAT GPIO.

DSP0401_ERR_PWM 

Something went wrong with PWM.

Definition at line 36 of file dsp0401.h.

Function Documentation

◆ dsp0401_clear_text()

void dsp0401_clear_text ( const dsp0401_t dev)

Clear the text displayed on the DSP0401.

Parameters
[in]devDevice descriptor of the DSP0401 device

◆ dsp0401_display_text()

void dsp0401_display_text ( const dsp0401_t dev,
char *  text 
)

Display the given text on the DSP0401.

Parameters
[in]devDevice descriptor of the DSP0401 device
[in]textThe text to display

◆ dsp0401_init()

int dsp0401_init ( dsp0401_t dev,
const dsp0401_params_t params 
)

Initialize the given DSP0401.

Parameters
[out]devInitialized device descriptor of DSP0401 device
[in]paramsDevice parameters to use
Returns
DSP0401_OK if everything is good
-DSP0401_ERR_CLK_GPIO if an error occurred during CLK GPIO initialization
-DSP0401_ERR_SDI_GPIO if an error occurred during SDI GPIO initialization
-DSP0401_ERR_LAT_GPIO if an error occurred during LAT GPIO initialization
-DSP0401_ERR_PWM if an error occurred during PWM initialization

◆ dsp0401_scroll_text()

void dsp0401_scroll_text ( const dsp0401_t dev,
char *  text,
uint16_t  delay 
)

Scroll the given text on the DSP0401.

Parameters
[in]devDevice descriptor of the DSP0401 device
[in]textThe text to scroll on the display
[in]delayDelay in ms between each horizontal move