Go to the source code of this file.
Defines | |
#define | DOT_7SEG_SET 0 |
#define | DOT_7SEG_CLEAR 1 |
#define | DOT_7SEG_FLIP 2 |
Functions | |
int | Spi7segInit (NUTDEVICE *dev) |
Initialize the 7seg device. | |
int | Spi7segCommand (NUTDEVICE *dev, uint8_t addr, CONST void *txbuf, void *rxbuf, int xlen) |
void | display_7seg (NUTDEVICE *dev, uint16_t number) |
void | print_7seg (NUTDEVICE *dev, char *chars) |
void | dot_7seg (NUTDEVICE *dev, uint8_t dotNumber, uint8_t dotCommand) |
Variables | |
NUTSPINODE | nodeSpi7SEG |
7seg SPI node implementation structure. | |
NUTDEVICE | devSpi7SEG |
7seg device implementation structure. |
* $Id: spi_ntrx.h$ *
Definition in file spi_7seg.h.
#define DOT_7SEG_SET 0 |
#define DOT_7SEG_CLEAR 1 |
#define DOT_7SEG_FLIP 2 |
int Spi7segInit | ( | NUTDEVICE * | dev | ) |
Initialize the 7seg device.
This routine determines the 7seg type. It is internally called by Nut/OS during device registration.
The driver framework may call this function more than once.
dev | Specifies the 7seg device. |
Definition at line 200 of file spi_7seg.c.
References NO_DIG_DECODE, NORM_OP_RESET, NUTASSERT, SEG_DEC_MODE, SEG_DIG0, SEG_DIG1, SEG_DIG2, SEG_DSP_TEST, SEG_INTENSITY, SEG_SCAN_LIM, SEG_SHUTDOWN, and TEST_MODE_OFF.
int Spi7segCommand | ( | NUTDEVICE * | dev, | |
uint8_t | addr, | |||
CONST void * | txbuf, | |||
void * | rxbuf, | |||
int | xlen | |||
) |
void display_7seg | ( | NUTDEVICE * | dev, | |
uint16_t | number | |||
) |
Definition at line 298 of file spi_7seg.c.
References ANY, HUNDRED, NUTASSERT, and TENNER.
Referenced by main().
void print_7seg | ( | NUTDEVICE * | dev, | |
char * | chars | |||
) |
Definition at line 362 of file spi_7seg.c.
References DOT_7SEG_CLEAR, DOT_7SEG_FLIP, DOT_7SEG_SET, MAX_7SEG_DIGITS, and NUTASSERT.
NUTSPINODE nodeSpi7SEG |
NUTDEVICE devSpi7SEG |
7seg device implementation structure.
Definition at line 127 of file spi_7seg.c.
Referenced by main().