projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Page header for BattFS.
[bertos.git]
/
cpu
/
arm
/
drv
/
ser_at91.c
diff --git
a/cpu/arm/drv/ser_at91.c
b/cpu/arm/drv/ser_at91.c
index e9804c206ee1c306f21ac68552f51fbd329bcf93..dfde32a52f01d5e25965c89ad14b5871d4be9a61 100644
(file)
--- a/
cpu/arm/drv/ser_at91.c
+++ b/
cpu/arm/drv/ser_at91.c
@@
-209,6
+209,7
@@
} while (0)
#endif
} while (0)
#endif
+#ifdef NOT_FOR_ARM_PORT_IT
/**
* \name Overridable SPI hooks
*
/**
* \name Overridable SPI hooks
*
@@
-233,7
+234,7
@@
#define SER_SPI_BUS_TXCLOSE
#endif
/*\}*/
#define SER_SPI_BUS_TXCLOSE
#endif
/*\}*/
-
+#endif
/**
* \def CONFIG_SER_STROBE
/**
* \def CONFIG_SER_STROBE
@@
-262,8
+263,10
@@
static unsigned char uart0_rxbuffer[CONFIG_UART0_RXBUFSIZE];
static unsigned char uart1_txbuffer[CONFIG_UART1_TXBUFSIZE];
static unsigned char uart1_rxbuffer[CONFIG_UART1_RXBUFSIZE];
static unsigned char uart1_txbuffer[CONFIG_UART1_TXBUFSIZE];
static unsigned char uart1_rxbuffer[CONFIG_UART1_RXBUFSIZE];
+#ifdef NOT_FOR_ARM_PORT_IT
static unsigned char spi_txbuffer[CONFIG_SPI_TXBUFSIZE];
static unsigned char spi_rxbuffer[CONFIG_SPI_RXBUFSIZE];
static unsigned char spi_txbuffer[CONFIG_SPI_TXBUFSIZE];
static unsigned char spi_rxbuffer[CONFIG_SPI_RXBUFSIZE];
+#endif
/**
* Internal hardware state structure
/**
* Internal hardware state structure
@@
-297,7
+300,10
@@
struct ArmSerial
*/
struct Serial *ser_uart0 = &ser_handles[SER_UART0];
struct Serial *ser_uart1 = &ser_handles[SER_UART1];
*/
struct Serial *ser_uart0 = &ser_handles[SER_UART0];
struct Serial *ser_uart1 = &ser_handles[SER_UART1];
+
+#ifdef NOT_FOR_ARM_PORT_IT
struct Serial *ser_spi = &ser_handles[SER_SPI];
struct Serial *ser_spi = &ser_handles[SER_SPI];
+#endif
static void uart0_irq_dispatcher(void);
static void uart1_irq_dispatcher(void);
static void uart0_irq_dispatcher(void);
static void uart1_irq_dispatcher(void);
@@
-441,7
+447,7
@@
static void uart1_setparity(UNUSED_ARG(struct SerialHardware *, _hw), int parity
}
/* SPI driver */
}
/* SPI driver */
-
+#ifdef NOT_FOR_ARM_PORT_IT
static void spi_init(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(struct Serial *, ser))
{
/*
static void spi_init(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(struct Serial *, ser))
{
/*
@@
-554,7
+560,7
@@
static void spi_setparity(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(i
{
// nop
}
{
// nop
}
-
+#endif
static bool tx_sending(struct SerialHardware* _hw)
static bool tx_sending(struct SerialHardware* _hw)
@@
-596,6
+602,7
@@
static const struct SerialHardwareVT UART1_VT =
C99INIT(txSending, tx_sending),
};
C99INIT(txSending, tx_sending),
};
+#ifdef NOT_FOR_ARM_PORT_IT
static const struct SerialHardwareVT SPI_VT =
{
C99INIT(init, spi_init),
static const struct SerialHardwareVT SPI_VT =
{
C99INIT(init, spi_init),
@@
-605,6
+612,7
@@
static const struct SerialHardwareVT SPI_VT =
C99INIT(txStart, spi_starttx),
C99INIT(txSending, tx_sending),
};
C99INIT(txStart, spi_starttx),
C99INIT(txSending, tx_sending),
};
+#endif
static struct ArmSerial UARTDescs[SER_CNT] =
{
static struct ArmSerial UARTDescs[SER_CNT] =
{
@@
-628,6
+636,7
@@
static struct ArmSerial UARTDescs[SER_CNT] =
},
C99INIT(sending, false),
},
},
C99INIT(sending, false),
},
+#ifdef NOT_FOR_ARM_PORT_IT
{
C99INIT(hw, /**/) {
C99INIT(table, &SPI_VT),
{
C99INIT(hw, /**/) {
C99INIT(table, &SPI_VT),
@@
-638,6
+647,7
@@
static struct ArmSerial UARTDescs[SER_CNT] =
},
C99INIT(sending, false),
}
},
C99INIT(sending, false),
}
+#endif
};
struct SerialHardware *ser_hw_getdesc(int unit)
};
struct SerialHardware *ser_hw_getdesc(int unit)