diff options
author | QMK Bot <hello@qmk.fm> | 2022-02-12 10:29:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-12 18:29:31 +0000 |
commit | 63646e8906e062d1c1de3925cba70c4e3426a855 (patch) | |
tree | 4e91648b77b838e1125cf86331d7e84bde6d07a9 /drivers/flash | |
parent | afcdd7079c774dec2aa4b7f2d08adf8b7310919b (diff) | |
download | qmk_firmware-63646e8906e062d1c1de3925cba70c4e3426a855.tar.gz qmk_firmware-63646e8906e062d1c1de3925cba70c4e3426a855.zip |
Format code according to conventions (#16322)
Diffstat (limited to 'drivers/flash')
-rw-r--r-- | drivers/flash/flash_spi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/flash/flash_spi.c b/drivers/flash/flash_spi.c index 2fa8891e38..f4cbf65159 100644 --- a/drivers/flash/flash_spi.c +++ b/drivers/flash/flash_spi.c @@ -65,7 +65,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define DEBUG_FLASH_SPI_OUTPUT -static bool spi_flash_start(void) { return spi_start(EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN, EXTERNAL_FLASH_SPI_LSBFIRST, EXTERNAL_FLASH_SPI_MODE, EXTERNAL_FLASH_SPI_CLOCK_DIVISOR); } +static bool spi_flash_start(void) { + return spi_start(EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN, EXTERNAL_FLASH_SPI_LSBFIRST, EXTERNAL_FLASH_SPI_MODE, EXTERNAL_FLASH_SPI_CLOCK_DIVISOR); +} static flash_status_t spi_flash_wait_while_busy(void) { uint32_t deadline = timer_read32() + EXTERNAL_FLASH_SPI_TIMEOUT; @@ -160,7 +162,9 @@ static flash_status_t spi_flash_transaction(uint8_t cmd, uint32_t addr, uint8_t return response; } -void flash_init(void) { spi_init(); } +void flash_init(void) { + spi_init(); +} flash_status_t flash_erase_chip(void) { flash_status_t response = FLASH_STATUS_SUCCESS; @@ -304,7 +308,7 @@ flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len) { dprintf(" %02X", (int)(((uint8_t *)read_buf)[i])); } dprintf("\n"); -#endif // DEBUG_FLASH_SPI_OUTPUT +#endif // DEBUG_FLASH_SPI_OUTPUT return response; } @@ -340,7 +344,7 @@ flash_status_t flash_write_block(uint32_t addr, const void *buf, size_t len) { dprintf(" %02X", (int)(uint8_t)(write_buf[i])); } dprintf("\n"); -#endif // DEBUG_FLASH_SPI_OUTPUT +#endif // DEBUG_FLASH_SPI_OUTPUT /* Perform the write. */ response = spi_flash_transaction(FLASH_CMD_PP, addr, write_buf, write_length); |