#include <avr/io.h>
#include <avr/interrupt.h>
#include "system.h"
#include <stdio.h>
#include <stdlib.h>
#include "xspi.h"
#include "task.h"
Go to the source code of this file.
Functions | |
void | INT7_vect (void) |
int | XspiTransfer (char *buff, int n) |
int | WaitXspiDone (void) |
void | InitXspi (void) |
void | XspiSetBitRate (unsigned long Rate) |
unsigned char | XspiTransferByte (unsigned char data) |
Variables | |
static ECB * | XspiSem |
static ECB * | XspiBlock |
volatile int | Int7Count |
volatile int | MaxCount |
void InitXspi | ( | void | ) |
Definition at line 81 of file xspi.c.
References BIT, NewSemaphore(), SEMAPHORE_MODE_BLOCKING, XSPI_IRQEN, and XspiSetBitRate().
void INT7_vect | ( | void | ) |
Definition at line 20 of file xspi.c.
References BIT, ExitInterrupt(), Int7Count, InterruptCount, MaxCount, PostSemaphore(), RESTORE_IRQ, SAVE_IRQ, and XSPI_CLEAR_IRQ.
int WaitXspiDone | ( | void | ) |
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 | ) |
Definition at line 102 of file xspi.c.
References Int7Count, PendSemaphore(), PostSemaphore(), XSPI_DATA, and XSPI_STARTPORT.
Referenced by mmcCommand(), mmcRead(), mmcReset(), mmcResponse(), mmcSendStatus(), and mmcWrite().
volatile int Int7Count |
volatile int MaxCount |