Clean-up style issues

Fix indentation issues, remove useless comments, correct if/else format
pull/2888/head
Laurent MEUNIER 2016-10-11 18:55:40 +02:00
parent 1fb5b3f2d0
commit 446dbe6a0e
1 changed files with 19 additions and 18 deletions

View File

@ -388,7 +388,6 @@ void spi_slave_write(spi_t *obj, int value)
struct spi_s *spiobj = SPI_S(obj);
SPI_HandleTypeDef *handle = &(spiobj->handle);
while (!ssp_writeable(obj));
//spi->DR = (uint16_t)value;
if (handle->Init.DataSize == SPI_DATASIZE_8BIT) {
// Force 8-bit access to the data register
uint8_t *p_spi_dr = 0;
@ -427,8 +426,11 @@ static int spi_master_start_asynch_transfer(spi_t *obj, transfer_type_t transfer
obj->spi.transfer_type = transfer_type;
if (is16bit) words = length / 2;
else words = length;
if (is16bit) {
words = length / 2;
} else {
words = length;
}
// enable the interrupt
IRQn_Type irq_n = spiobj->spiIRQ;
@ -438,7 +440,6 @@ static int spi_master_start_asynch_transfer(spi_t *obj, transfer_type_t transfer
NVIC_EnableIRQ(irq_n);
// enable the right hal transfer
//static uint16_t sink;
int rc = 0;
switch(transfer_type) {
case SPI_TRANSFER_TYPE_TXRX: