rt-thread/bsp/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sram.h

30 lines
730 B
C
Raw Normal View History

2021-02-18 13:29:12 +08:00
#ifndef __SWM320_SRAM_H__
#define __SWM320_SRAM_H__
2021-05-06 10:42:41 +08:00
typedef struct
{
uint8_t ClkDiv; //SRAM_CLKDIV_5...SRAM_CLKDIV_16根据SRAM芯片所能跑的最高频率选择合适分频
uint8_t DataWidth; //SRAM_DATAWIDTH_8、SRAM_DATAWIDTH_16
2021-02-18 13:29:12 +08:00
} SRAM_InitStructure;
2021-05-06 10:42:41 +08:00
#define SRAM_CLKDIV_4 3
#define SRAM_CLKDIV_5 4
#define SRAM_CLKDIV_6 5
#define SRAM_CLKDIV_7 6
#define SRAM_CLKDIV_8 7
#define SRAM_CLKDIV_9 8
#define SRAM_CLKDIV_10 9
#define SRAM_CLKDIV_11 10
#define SRAM_CLKDIV_12 11
#define SRAM_CLKDIV_13 12
#define SRAM_CLKDIV_14 13
#define SRAM_CLKDIV_15 14
#define SRAM_CLKDIV_16 15
#define SRAM_DATAWIDTH_8 1
#define SRAM_DATAWIDTH_16 0
void SRAM_Init(SRAM_InitStructure *initStruct);
2021-02-18 13:29:12 +08:00
#endif //__SWM320_SRAM_H__