rt-thread/bsp/essemi/es32f0654/drivers/drv_spiflash.c

35 lines
690 B
C
Raw Normal View History

2019-02-15 16:12:52 +08:00
/*
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2019-02-15 wangyq the first version
* 2019-11-01 wangyq update libraries
2019-02-15 16:12:52 +08:00
*/
#include "board.h"
2019-02-15 16:12:52 +08:00
#include <rtthread.h>
#if defined(BSP_USING_SPI_FLASH)
2019-02-15 16:12:52 +08:00
#include "spi_flash.h"
#include "drv_spiflash.h"
#include "spi_flash_sfud.h"
#include "drv_spi.h"
int rt_hw_spi_flash_init(void)
2019-02-15 16:12:52 +08:00
{
2021-10-10 03:33:43 +08:00
if (RT_NULL == rt_sfud_flash_probe(ES_DEVICE_NAME_SPI_FALSH_DEV, ES_DEVICE_NAME_SPI_DEV))
2019-02-15 16:12:52 +08:00
{
return -RT_ERROR;
};
return RT_EOK;
}
INIT_COMPONENT_EXPORT(rt_hw_spi_flash_init);
2019-02-15 16:12:52 +08:00
#endif