diff options
| author | QMK Bot <hello@qmk.fm> | 2020-04-08 01:38:16 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2020-04-08 01:38:16 +0000 |
| commit | 974f83ec4b935a019bcb9c9c1e5ef57598267865 (patch) | |
| tree | e79c7799abc8f6b477a87345ba0706ad78254c36 /drivers | |
| parent | 400ca2d035d7bdb85c077a53b2cd85cdd04882ab (diff) | |
| download | qmk_firmware-974f83ec4b935a019bcb9c9c1e5ef57598267865.tar.gz qmk_firmware-974f83ec4b935a019bcb9c9c1e5ef57598267865.zip | |
format code according to conventions [skip ci]
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/avr/spi_master.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/avr/spi_master.c b/drivers/avr/spi_master.c index 497d50536..3f405ddf5 100644 --- a/drivers/avr/spi_master.c +++ b/drivers/avr/spi_master.c | |||
| @@ -34,9 +34,9 @@ | |||
| 34 | # define SPI_MISO_PIN B4 | 34 | # define SPI_MISO_PIN B4 |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | static pin_t currentSlavePin = NO_PIN; | 37 | static pin_t currentSlavePin = NO_PIN; |
| 38 | static uint8_t currentSlaveConfig = 0; | 38 | static uint8_t currentSlaveConfig = 0; |
| 39 | static bool currentSlave2X = false; | 39 | static bool currentSlave2X = false; |
| 40 | 40 | ||
| 41 | void spi_init(void) { | 41 | void spi_init(void) { |
| 42 | writePinHigh(SPI_SS_PIN); | 42 | writePinHigh(SPI_SS_PIN); |
| @@ -114,7 +114,7 @@ spi_status_t spi_write(uint8_t data, uint16_t timeout) { | |||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | spi_status_t spi_read(uint16_t timeout) { | 116 | spi_status_t spi_read(uint16_t timeout) { |
| 117 | SPDR = 0x00; // Dummy | 117 | SPDR = 0x00; // Dummy |
| 118 | 118 | ||
| 119 | uint16_t timeout_timer = timer_read(); | 119 | uint16_t timeout_timer = timer_read(); |
| 120 | while (!(SPSR & _BV(SPIF))) { | 120 | while (!(SPSR & _BV(SPIF))) { |
| @@ -157,7 +157,7 @@ void spi_stop(void) { | |||
| 157 | currentSlavePin = NO_PIN; | 157 | currentSlavePin = NO_PIN; |
| 158 | SPCR &= ~(currentSlaveConfig); | 158 | SPCR &= ~(currentSlaveConfig); |
| 159 | currentSlaveConfig = 0; | 159 | currentSlaveConfig = 0; |
| 160 | SPSR = 0; | 160 | SPSR = 0; |
| 161 | currentSlave2X = false; | 161 | currentSlave2X = false; |
| 162 | } | 162 | } |
| 163 | } | 163 | } |
