[MAX326xx] Synchronizing SPI drivers.

pull/2432/head
Jeremy Brodt 2016-08-16 09:23:31 -05:00
parent e628254c08
commit 7be00b8fa8
2 changed files with 2 additions and 6 deletions

View File

@ -88,10 +88,6 @@ void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel
obj->spi->gen_ctrl = (MXC_F_SPI_GEN_CTRL_SPI_MSTR_EN |
MXC_F_SPI_GEN_CTRL_TX_FIFO_EN |
MXC_F_SPI_GEN_CTRL_RX_FIFO_EN );
// Give instance the default settings
spi_format(obj, DEFAULT_CHAR, DEFAULT_MODE, 0);
spi_frequency(obj, DEFAULT_FREQ);
}
//******************************************************************************

View File

@ -141,7 +141,7 @@ void spi_frequency(spi_t *obj, int hz)
}
//******************************************************************************
int spi_master_write(spi_t *obj, int value)
int spi_master_write(spi_t *obj, int value)
{
int bits = spi_bits;
if(spi_bits == 32) {
@ -180,7 +180,7 @@ int spi_master_write(spi_t *obj, int value)
}
//******************************************************************************
int spi_busy(spi_t *obj)
int spi_busy(spi_t *obj)
{
return !(obj->spi->intfl & MXC_F_SPI_INTFL_TX_READY);
}