提交 44f25b0e 编写于 作者: G guozhanxin

[bsp][imxrt] 拆分 flexspi.c/h 驱动,区分 flash 大小

上级 1d35defc
......@@ -461,4 +461,3 @@ SECTION("itcm") int rt_hw_flexspi_init(void)
rt_hw_interrupt_enable(level);
return 0;
}
INIT_PREV_EXPORT(rt_hw_flexspi_init);
......@@ -385,4 +385,3 @@ SECTION("itcm") int rt_hw_flexspi_init(void)
rt_hw_interrupt_enable(level);
return 0;
}
INIT_PREV_EXPORT(rt_hw_flexspi_init);
......@@ -5,6 +5,7 @@ cwd = GetCurrentDir()
# add the general drivers.
src = Split("""
board.c
drv_flexspi.c
""")
CPPPATH = [cwd]
......
#include <rtthread.h>
#include <drv_flexspi.h>
INIT_PREV_EXPORT(rt_hw_flexspi_init);
#ifndef __DRV_FLEXSPI_H__
#define __DRV_FLEXSPI_H__
#include "fsl_flexspi.h"
#include "fsl_common.h"
#ifdef BOARD_USING_QSPIFLASH
#define FLASH_SIZE 0x2000 /* 64Mb/KByte */
#define FLASH_PAGE_SIZE 256
#define FLEXSPI_NOR_SECTOR_SIZE 0x1000 /* 4K */
#elif defined(BOARD_USING_HYPERFLASH)
#define FLASH_SIZE 0x10000 /* 512Mb/KByte */
#define FLASH_PAGE_SIZE 512
#define FLEXSPI_NOR_SECTOR_SIZE 0x40000 /* 256K */
#endif
#define FLEXSPI_AMBA_BASE FlexSPI_AMBA_BASE
extern int rt_hw_flexspi_init(void);
extern status_t flexspi_nor_flash_erase_sector(FLEXSPI_Type *base, uint32_t address);
extern status_t flexspi_nor_flash_page_program(FLEXSPI_Type *base, uint32_t address, const uint32_t *src);
#endif
......@@ -5,6 +5,7 @@ cwd = GetCurrentDir()
# add the general drivers.
src = Split("""
board.c
drv_flexspi.c
""")
CPPPATH = [cwd]
......
#include <rtthread.h>
#include <drv_flexspi.h>
INIT_PREV_EXPORT(rt_hw_flexspi_init);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册