Ejemplo n.º 1
0
static int rt_hw_spi_flash_with_sfud_init(void)
{
    if (RT_NULL == rt_sfud_flash_probe(SPI_FLASH_CHIP, SPI_FLASH_DEVICE_NAME))
    {
        return RT_ERROR;
    };

	return RT_EOK;
}
Ejemplo n.º 2
0
static int rt_hw_spi_flash_with_sfud_init(void)
{
    if (RT_NULL == rt_sfud_flash_probe("W25Q256", "spi50"))
    {
        return RT_ERROR;
    };

	return RT_EOK;
}
Ejemplo n.º 3
0
static int rt_hw_spi_flash_init(void)
{
    __HAL_RCC_GPIOF_CLK_ENABLE();
    rt_hw_spi_device_attach("spi5", "spi50", GPIOF, GPIO_PIN_6);

    if (RT_NULL == rt_sfud_flash_probe("W25Q128", "spi50"))
    {
        return -RT_ERROR;
    }

    return RT_EOK;
}
Ejemplo n.º 4
0
int wm_nor_flash_init(void)
{
    rt_spi_flash_device_t spi_device;

    wm_spi_bus_attach_device(SPI_Flash_BUS_NAME, "norspi", SPI_Flash_CS_PIN);
    spi_device = rt_sfud_flash_probe("flash0", "norspi");
    if (spi_device == RT_NULL)
    {
        return -RT_ERROR;
    }
    return 0;
}
Ejemplo n.º 5
0
static int rt_hw_qspi_flash_with_sfud_init(void)
{
    stm32_qspi_bus_attach_device("qspi1", "qspi10", RT_NULL, 4, w25qxx_enter_qspi_mode, RT_NULL);
    
    /* init W25Q256 */
    if (RT_NULL == rt_sfud_flash_probe("W25Q256", "qspi10"))
    {
        return -RT_ERROR;
    }

    return RT_EOK;
}
Ejemplo n.º 6
0
int rt_hw_spi_flash_with_sfud_init(void)
{
    DEBUG_PRINTF("%s -> %d\n", __FUNCTION__, __LINE__);
    spi_device = rt_sfud_flash_probe(SPI_FLASH_CHIP, SPI_FLASH_DEVICE_NAME);
    if (spi_device == NULL)
    {
        DEBUG_PRINTF("%s -> %d\n", __FUNCTION__, __LINE__);
        return RT_ERROR;
    };

    DEBUG_PRINTF("%s -> %d\n", __FUNCTION__, __LINE__);
    return RT_EOK;
}