Fix previous pull request compilation errors

pull/207/head
Bogdan Marinescu 2014-03-11 17:02:10 +00:00
parent 9105963e2c
commit bca4f4e0e4
2 changed files with 6 additions and 6 deletions

View File

@ -215,7 +215,7 @@ static inline int ssp_writeable(spi_t *obj) {
static inline void ssp_write(spi_t *obj, int value) {
SPI_TypeDef *spi = (SPI_TypeDef *)(obj->spi);
while (!ssp_writeable(obj));
if(obj->bits == SPI_DATASIZE_8BIT) // 8 bit mode
if(obj->bits == SPI_DataSize_8b) // 8 bit mode
SPI_SendData8(spi, (uint8_t)value);
else
SPI_I2S_SendData16(spi, (uint16_t)value);
@ -224,7 +224,7 @@ static inline void ssp_write(spi_t *obj, int value) {
static inline int ssp_read(spi_t *obj) {
SPI_TypeDef *spi = (SPI_TypeDef *)(obj->spi);
while (!ssp_readable(obj));
if(obj->bits == SPI_DATASIZE_8BIT) // 8 bit mode
if(obj->bits == SPI_DataSize_8b) // 8 bit mode
return (int)SPI_ReceiveData8(spi);
else // 16 bit mode
return (int)SPI_I2S_ReceiveData16(spi);
@ -248,7 +248,7 @@ int spi_slave_receive(spi_t *obj) {
int spi_slave_read(spi_t *obj) {
SPI_TypeDef *spi = (SPI_TypeDef *)(obj->spi);
if(obj->bits == SPI_DATASIZE_8BIT) // 8 bit mode
if(obj->bits == SPI_DataSize_8b) // 8 bit mode
return (int)SPI_ReceiveData8(spi);
else
return (int)SPI_I2S_ReceiveData16(spi);
@ -257,7 +257,7 @@ int spi_slave_read(spi_t *obj) {
void spi_slave_write(spi_t *obj, int value) {
SPI_TypeDef *spi = (SPI_TypeDef *)(obj->spi);
while (!ssp_writeable(obj));
if(obj->bits == SPI_DATASIZE_8BIT) // 8 bit mode
if(obj->bits == SPI_DataSize_8b) // 8 bit mode
SPI_SendData8(spi, (uint8_t)value);
else
SPI_I2S_SendData16(spi, (uint16_t)value);

View File

@ -43,8 +43,8 @@ typedef enum {
typedef enum {
UART_1 = (int)USART1_BASE,
UART_2 = (int)USART2_BASE
UART_3 = (int)USART6_BASE,
UART_2 = (int)USART2_BASE,
UART_3 = (int)USART6_BASE
} UARTName;
#define STDIO_UART_TX PA_2