diff options
| author | Bernard Xiong <[email protected]> | 2021-05-28 16:20:08 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-28 16:20:08 +0800 |
| commit | 92beddf3bccf6346e26aa097f82464456fb8e6bd (patch) | |
| tree | 197e4a108118dda016ea02274172f0c40e7ee8ed /bsp/lpc54114-lite/drivers/drv_spi_flash.c | |
| parent | b18a99b44240ec3152011e159cc24a5af8dff0ce (diff) | |
| parent | 03f4d40e30f3c94e1db0b3a65b3610dee695694a (diff) | |
Merge pull request #4737 from mysterywolf/3,1,xformatv3.1.5
[lts 3.1.x] format codes
Diffstat (limited to 'bsp/lpc54114-lite/drivers/drv_spi_flash.c')
| -rw-r--r-- | bsp/lpc54114-lite/drivers/drv_spi_flash.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/bsp/lpc54114-lite/drivers/drv_spi_flash.c b/bsp/lpc54114-lite/drivers/drv_spi_flash.c index 65433ce30c..11098636f9 100644 --- a/bsp/lpc54114-lite/drivers/drv_spi_flash.c +++ b/bsp/lpc54114-lite/drivers/drv_spi_flash.c @@ -1,14 +1,14 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 */ - -#include "drv_spi.h" + +#include "drv_spi.h" #include "drv_spi_flash.h" -#include "rtthread.h" -#include "rtdevice.h" +#include "rtthread.h" +#include "rtdevice.h" #include "spi_flash.h" #include "spi_flash_sfud.h" @@ -16,19 +16,19 @@ int rt_hw_flash_init(void) { - rt_err_t result; - - result = lpc_spi_bus_attach_device("spi2", "spi20", RT_SPI_FLASH_CS_PIN); - if(result != RT_EOK) + rt_err_t result; + + result = lpc_spi_bus_attach_device("spi2", "spi20", RT_SPI_FLASH_CS_PIN); + if(result != RT_EOK) { - return result; + return result; } - - if(rt_sfud_flash_probe("flash0", "spi20") == RT_NULL) + + if(rt_sfud_flash_probe("flash0", "spi20") == RT_NULL) { return RT_ERROR; } - return RT_EOK; + return RT_EOK; } -INIT_DEVICE_EXPORT(rt_hw_flash_init); +INIT_DEVICE_EXPORT(rt_hw_flash_init); |
