spi_7seg.h File Reference

ntrx More...

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.


Detailed Description

ntrx

 * $Id: spi_ntrx.h$
 * 

Definition in file spi_7seg.h.


Define Documentation

#define DOT_7SEG_SET   0

Definition at line 52 of file spi_7seg.h.

Referenced by dot_7seg().

#define DOT_7SEG_CLEAR   1

Definition at line 53 of file spi_7seg.h.

Referenced by dot_7seg().

#define DOT_7SEG_FLIP   2

Definition at line 54 of file spi_7seg.h.

Referenced by dot_7seg().


Function Documentation

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.

Parameters:
dev Specifies the 7seg device.
Returns:
0 on success or -1 if no valid 7seg was found.

Definition at line 210 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 308 of file spi_7seg.c.

References ANY, HUNDRED, NUTASSERT, and TENNER.

void print_7seg ( NUTDEVICE *  dev,
char *  chars 
)

Definition at line 336 of file spi_7seg.c.

References MAX_7SEG_DIGITS, and NUTASSERT.

void dot_7seg ( NUTDEVICE *  dev,
uint8_t  dotNumber,
uint8_t  dotCommand 
)

Definition at line 372 of file spi_7seg.c.

References DOT_7SEG_CLEAR, DOT_7SEG_FLIP, DOT_7SEG_SET, MAX_7SEG_DIGITS, and NUTASSERT.


Variable Documentation

NUTSPINODE nodeSpi7SEG

7seg SPI node implementation structure.

Definition at line 125 of file spi_7seg.c.

NUTDEVICE devSpi7SEG

7seg device implementation structure.

Definition at line 137 of file spi_7seg.c.


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/