Changeset 388 for trunk/softs/tsar_boot/src/spi.c
- Timestamp:
- May 16, 2013, 3:01:37 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/tsar_boot/src/spi.c
r292 r388 1 /* 1 /** 2 2 * \file spi.c 3 * \dat a31 August 20123 * \date 31 August 2012 4 4 * \author Cesar Fuguet <cesar.fuguet-tortolero@lip6.fr> 5 5 */ … … 15 15 static void _spi_wait_if_busy(struct spi_dev * spi) 16 16 { 17 volatileregister int delay;17 register int delay; 18 18 19 19 while(SPI_IS_BUSY(spi)) 20 20 { 21 for (delay = 0; delay < 100 00; delay++);21 for (delay = 0; delay < 100; delay++); 22 22 } 23 23 } … … 58 58 iowrite8(&spi->rx_tx[index % 4], byte); 59 59 _spi_init_transfer(spi); 60 61 asm volatile("sync");62 60 } 63 61 _spi_wait_if_busy(spi); … … 104 102 if (spi_freq > 0 && sys_freq > 0) 105 103 iowrite32(&spi->divider, _spi_calc_divider_value(spi_freq, sys_freq)); 106 107 104 } 108 105
Note: See TracChangeset
for help on using the changeset viewer.