2da43febbd
* add some apm32 bsp and fix apm32f0/apm32f4 gcc startup assembly file bug and fix drv_eth.c bug * fix apm32f103xe-minibroard and apm32f407ig-minibroard link.lds file error * replace apm32f051r8-evalboard picture * fix apm32f1 gcc assembly startup file suffix name * renamed startup_apm32f10x_md.s/startup_apm32f10x_hd.s file and modify apm32f103xe-minibroard/board SConscript file
31 lines
666 B
C
31 lines
666 B
C
/*
|
|
* Copyright (c) 2006-2023, RT-Thread Development Team
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Change Logs:
|
|
* Date Author Notes
|
|
* 2022-12-29 luobeihai first version
|
|
*/
|
|
|
|
#include <rtthread.h>
|
|
#include "spi_flash.h"
|
|
#include "spi_flash_sfud.h"
|
|
#include "drv_spi.h"
|
|
|
|
#if defined(BSP_USING_SPI_FLASH)
|
|
static int rt_hw_spi_flash_init(void)
|
|
{
|
|
RCM_EnableAPB2PeriphClock(RCM_APB2_PERIPH_GPIOA);
|
|
rt_hw_spi_device_attach("spi3", "spi30", GPIOA, GPIO_PIN_15);
|
|
|
|
if (RT_NULL == rt_sfud_flash_probe("W25Q16", "spi30"))
|
|
{
|
|
return -RT_ERROR;
|
|
}
|
|
|
|
return RT_EOK;
|
|
}
|
|
INIT_COMPONENT_EXPORT(rt_hw_spi_flash_init);
|
|
#endif
|