blob: 9d1152cb4200ff413a86fb8a70bbb758050756c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*
* Copyright (c) 2006-2026, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2026-06-03 CoreBoxer support IMXRT1180-EVK
*/
#ifndef __DRV_FLEXSPI_H__
#define __DRV_FLEXSPI_H__
#include <rtthread.h>
#include "fsl_flexspi.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Put critical transfer code into ITCM (Code TCM) */
#if defined(__CC_ARM) || defined(__ARMCC_VERSION)
#define FLEXSPI_RAM_CODE __attribute__((section("CodeQuickAccess"), noinline))
#elif defined(__GNUC__)
#define FLEXSPI_RAM_CODE __attribute__((section("CodeQuickAccess"), noinline))
#elif defined(__ICCARM__)
#define FLEXSPI_RAM_CODE __ramfunc
#else
#define FLEXSPI_RAM_CODE
#endif
typedef struct
{
FLEXSPI_Type *base;
flexspi_port_t port;
uint32_t ahb_base;
} imxrt_flexspi_handle_t;
/* Get initialized FlexSPI handle (FlexSPI1 or FlexSPI2 decided by BSP config) */
imxrt_flexspi_handle_t *imxrt_flexspi_get_handle(void);
#ifdef __cplusplus
}
#endif
#endif /* __DRV_FLEXSPI_H__ */
|