E:/Projects/AvrLib/include/xspi.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define XSPI_DATA   *((volatile unsigned char *)0xf078)
#define XSPI_BITRATE   *((volatile unsigned char *)0xf079)
#define XSPI_STATUS   *((volatile unsigned char *)0xf07a)
#define XSPI_CONTROL   *((volatile unsigned char *)0xf07b)
#define XSPI_NRFIFO   *((volatile unsigned *)0xf07c)
#define XSPI_NTFIFO   *((volatile unsigned *)0xf07e)
#define XSPI_CLOCK   (50000000L)
#define XSPI_STATUS_TFIFOMT   (0)
#define XSPI_STATUS_TFIFOFULL   (1)
#define XSPI_STATUS_RFIFOMT   (2)
#define XSPI_STATUS_RFIFOFULL   (3)
#define XSPI_STATUS_IRQ   (4)
#define XSPI_CTL_IRQEN   (0)
#define XSPI_CTL_STARTPORT   (1)
#define XSPI_CTL_CE   (2)
#define XSPI_CLEAR_IRQ()   XSPI_STATUS = BIT(XSPI_STATUS_IRQ)
#define XSPI_IRQEN()   XSPI_CONTROL |= BIT(XSPI_CTL_IRQEN)
#define XSPI_STARTPORT()   XSPI_CONTROL |= BIT(XSPI_CTL_STARTPORT)
#define XSPI_IRQDIS()   XSPI_CONTROL &= ~(BIT(XSPI_CTL_IRQEN))
#define XSPI_SET_CE()   XSPI_CONTROL |= BIT(XSPI_CTL_CE)
#define XSPI_CLR_CE()   XSPI_CONTROL &= ~(BIT(XSPI_CTL_CE))

Functions

void InitXspi (void)
void XspiSetBitRate (unsigned long Rate)
unsigned char XspiTransferByte (unsigned char data)
int XspiTransfer (char *buff, int n)


Define Documentation

#define XSPI_BITRATE   *((volatile unsigned char *)0xf079)

Definition at line 13 of file xspi.h.

Referenced by XspiSetBitRate().

 
#define XSPI_CLEAR_IRQ (  )     XSPI_STATUS = BIT(XSPI_STATUS_IRQ)

Definition at line 44 of file xspi.h.

Referenced by INT7_vect().

#define XSPI_CLOCK   (50000000L)

Definition at line 19 of file xspi.h.

Referenced by XspiSetBitRate().

 
#define XSPI_CLR_CE (  )     XSPI_CONTROL &= ~(BIT(XSPI_CTL_CE))

Definition at line 49 of file xspi.h.

Referenced by mmcInit(), mmcRead(), mmcReset(), mmcSendCommand(), mmcSendStatus(), and mmcWrite().

#define XSPI_CONTROL   *((volatile unsigned char *)0xf07b)

Definition at line 15 of file xspi.h.

#define XSPI_CTL_CE   (2)

Definition at line 37 of file xspi.h.

#define XSPI_CTL_IRQEN   (0)

Definition at line 35 of file xspi.h.

#define XSPI_CTL_STARTPORT   (1)

Definition at line 36 of file xspi.h.

#define XSPI_DATA   *((volatile unsigned char *)0xf078)

Definition at line 12 of file xspi.h.

Referenced by XspiTransfer(), and XspiTransferByte().

 
#define XSPI_IRQDIS (  )     XSPI_CONTROL &= ~(BIT(XSPI_CTL_IRQEN))

Definition at line 47 of file xspi.h.

 
#define XSPI_IRQEN (  )     XSPI_CONTROL |= BIT(XSPI_CTL_IRQEN)

Definition at line 45 of file xspi.h.

Referenced by InitXspi().

#define XSPI_NRFIFO   *((volatile unsigned *)0xf07c)

Definition at line 16 of file xspi.h.

#define XSPI_NTFIFO   *((volatile unsigned *)0xf07e)

Definition at line 17 of file xspi.h.

 
#define XSPI_SET_CE (  )     XSPI_CONTROL |= BIT(XSPI_CTL_CE)

Definition at line 48 of file xspi.h.

Referenced by mmcRead(), mmcReset(), mmcSendCommand(), mmcSendStatus(), and mmcWrite().

 
#define XSPI_STARTPORT (  )     XSPI_CONTROL |= BIT(XSPI_CTL_STARTPORT)

Definition at line 46 of file xspi.h.

Referenced by XspiTransfer(), and XspiTransferByte().

#define XSPI_STATUS   *((volatile unsigned char *)0xf07a)

Definition at line 14 of file xspi.h.

#define XSPI_STATUS_IRQ   (4)

Definition at line 29 of file xspi.h.

#define XSPI_STATUS_RFIFOFULL   (3)

Definition at line 28 of file xspi.h.

#define XSPI_STATUS_RFIFOMT   (2)

Definition at line 27 of file xspi.h.

#define XSPI_STATUS_TFIFOFULL   (1)

Definition at line 26 of file xspi.h.

#define XSPI_STATUS_TFIFOMT   (0)

Definition at line 25 of file xspi.h.


Function Documentation

void InitXspi ( void   ) 

Definition at line 81 of file xspi.c.

References BIT, NewSemaphore(), SEMAPHORE_MODE_BLOCKING, XSPI_IRQEN, and XspiSetBitRate().

void XspiSetBitRate ( unsigned long  Rate  ) 

Definition at line 92 of file xspi.c.

References XSPI_BITRATE, and XSPI_CLOCK.

Referenced by InitXspi().

int XspiTransfer ( char *  buff,
int  n 
)

Definition at line 35 of file xspi.c.

References PendSemaphore(), PostSemaphore(), XSPI_DATA, and XSPI_STARTPORT.

Referenced by mmcCommand(), mmcRead(), mmcReset(), and mmcWrite().

unsigned char XspiTransferByte ( unsigned char  data  ) 


Generated on Sun Aug 31 13:30:55 2008 for FrankenRTOS by  doxygen 1.5.6