3 #include <asm/hardware.h>
6 int AT91F_GetMuxStatus(void) {
7 #ifdef DATAFLASH_MMC_SELECT
8 AT91C_BASE_PIOB->PIO_PER = DATAFLASH_MMC_SELECT; /* Set in PIO mode */
9 AT91C_BASE_PIOB->PIO_OER = DATAFLASH_MMC_SELECT; /* Configure in output */
12 if(AT91C_BASE_PIOB->PIO_ODSR & DATAFLASH_MMC_SELECT) {
21 void AT91F_SelectMMC(void) {
22 #ifdef DATAFLASH_MMC_SELECT
23 AT91C_BASE_PIOB->PIO_PER = DATAFLASH_MMC_SELECT; /* Set in PIO mode */
24 AT91C_BASE_PIOB->PIO_OER = DATAFLASH_MMC_SELECT; /* Configure in output */
26 AT91C_BASE_PIOB->PIO_SODR = DATAFLASH_MMC_SELECT;
30 void AT91F_SelectSPI(void) {
31 #ifdef DATAFLASH_MMC_SELECT
32 AT91C_BASE_PIOB->PIO_PER = DATAFLASH_MMC_SELECT; /* Set in PIO mode */
33 AT91C_BASE_PIOB->PIO_OER = DATAFLASH_MMC_SELECT; /* Configure in output */
35 AT91C_BASE_PIOB->PIO_CODR = DATAFLASH_MMC_SELECT;