File nut/dev/spi_7seg.c

** ** 7-Segement Driver: Character Table **

References Functions: Spi7SegClose() nut/dev/spi_7seg.c
  Spi7SegIOCtl() nut/dev/spi_7seg.c
  Spi7SegOpen() nut/dev/spi_7seg.c
  Spi7segInit() nut/dev/spi_7seg.c
  Spi7segWrite() nut/dev/spi_7seg.c
References Variables: nodeSpi7SEG nut/dev/spi_7seg.c

Included Files


Preprocessor definitions

#define NPRINTF( args, ... )

#define SEG7_DIGITS 4

#define SEG7_REVERSE

#define SEGR_NOOP 0x00

#define SEGR_DIG0 0x01

#define SEGR_DIG1 0x02

#define SEGR_DIG2 0x03

#define SEGR_DIG3 0x04

#define SEGR_DIG4 0x05

#define SEGR_DIG5 0x06

#define SEGR_DIG6 0x07

#define SEGR_DIG7 0x08

#define SEGR_DEC_MODE 0x09

#define SEGR_INTENSITY 0x0a

#define SEGR_SCAN_LIM 0x0b

#define SEGR_SHUTDOWN 0x0c

#define SEGR_FEATURE 0x0e

#define SEGR_DSP_TEST 0x0f

#define SHUTDOWN_RESET 0x00

#define SHUTDOWN_SOFT 0x80

#define NORM_OP_RESET 0x01

#define NORM_OP_SOFT 0x81

#define NO_DIG_DECODE 0x00

#define DIG_0_DECODE 0x01

#define DIG_0_3_DECODE 0x0f

#define DIG_0_7_DECODE 0xff

#define SEGF_EXTCLK 0x01

#define SEGF_REGRES 0x02

#define SEGF_DECSEL 0x04

#define SEGF_SPIEN 0x08

#define SEGF_BLINK 0x10

#define SEGF_BLSLOW 0x20

#define SEGF_BLSYNC 0x40

#define SEGF_BLSTART 0x80

#define SEGF_BLMASK

#define TEST_MODE_OFF 0x00

#define TEST_MODE_ON 0x01

#define DISPLAY_LIMIT 2

#define SPI_RATE_DISP_7SEG 400000

#define SPI_MODE_DISP_7SEG SPI_MODE_3

#define ICMD_UPDATE 0x01

#define ICMD_INTENS 0x02

#define ICMD_ESCAPE 0x80


Typedef DCB_7SEG

typedef struct {...} DCB_7SEG
struct  
   {  
      uint_fast8_t digit[4];  
      uint_fast8_t dip;  
      uint_fast8_t freg;  
      uint_fast8_t icmd;  
   }  

Global Variable nodeSpi7SEG

NUTSPINODE nodeSpi7SEG
Visible in:   nut/dev/spi_7seg.c
Used in:   nut/dev/spi_7seg.c

Global Variable devSpi7SEG

NUTDEVICE devSpi7SEG
Visible in:   nut/dev/spi_7seg.c

Local Variables

Seg7CharTab
static const uint8_t Seg7CharTab[]
Used in: Spi7segPutc()  

Global Function Spi7SegOpen()

NUTFILE* Spi7SegOpen ( NUTDEVICE* dev, const char* name, int mode, int acc )
Calls: malloc() nut/crt/malloc.c
Used in:   nut/dev/spi_7seg.c

Global Function Spi7SegPush()

void Spi7SegPush ( NUTDEVICE* dev )
Calls: disp7segCommand() nut/dev/spi_7seg.c
Called by: Spi7segDot() nut/dev/spi_7seg.c
  Spi7segPutc() nut/dev/spi_7seg.c

Global Function Spi7segDot()

void Spi7segDot ( NUTDEVICE* dev, uint8_t pos, uint8_t act )
Prototyped in: nut/include/dev/spi_7seg.h
Calls: Spi7SegPush() nut/dev/spi_7seg.c

Global Function Spi7segInit()

int Spi7segInit ( NUTDEVICE* dev )
Calls: disp7segCommand() nut/dev/spi_7seg.c
  malloc() nut/crt/malloc.c
  memset() nut/c/string/memset.c
Used in:   nut/dev/spi_7seg.c

Global Function Spi7segPutc()

int Spi7segPutc ( NUTDEVICE* dev, char c )
Calls: Spi7SegPush() nut/dev/spi_7seg.c
  disp7segCommand() nut/dev/spi_7seg.c
  memset() nut/c/string/memset.c
Called by: Spi7segWrite() nut/dev/spi_7seg.c
References Variables: Seg7CharTab nut/dev/spi_7seg.c

Global Function Spi7segWrite()

int Spi7segWrite ( NUTFILE* fp, const void* buffer, int len )
Calls: Spi7segPutc() nut/dev/spi_7seg.c
Used in:   nut/dev/spi_7seg.c

Local Function Spi7SegClose()

static int Spi7SegClose ( NUTFILE* fp )
Calls: free() nut/crt/malloc.c
Used in:   nut/dev/spi_7seg.c

Local Function Spi7SegIOCtl()

static int Spi7SegIOCtl ( NUTDEVICE* dev, int req, void* conf )
Used in:   nut/dev/spi_7seg.c

Local Function disp7segCommand()

static int disp7segCommand ( NUTSPINODE* node, uint8_t addr, const void* txbuf, void* rxbuf, int xlen )
Called by: Spi7SegPush() nut/dev/spi_7seg.c
  Spi7segInit() nut/dev/spi_7seg.c
  Spi7segPutc() nut/dev/spi_7seg.c