相关的源文件包括
fpinctrl.h
fiopad.h --> E2000
fiopad.c
fioctrl.h --> FT2000/4, D2000
fioctrl.c
调用 FIOCTRL_INDEX 生成PAD对应的索引,e.g.
| 偏移 | 位域 | 说明 |
|---|---|---|
| 0x0208 | [27 : 26] | 控制 i2c_0_scl_pad 的上下拉 2'b10 |
| [25 : 24] | 控制 i2c_0_scl_pad 的复用功能 2'b00 |
#define FIOCTRL_I2C0_SCL_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 24) /* i2c0-scl: func 0 */
定义控制域为 i2c0_scl_pad 的PAD,其中延时配置寄存器偏移量为0x208, 输入延时配置位从第24位开始
Note:
FPinFunc FPinGetFunc(const FPinIndex pin);
Note:
Input:
Return:
void FPinSetFunc(const FPinIndex pin, FPinFunc func);
Note:
Input:
Return:
FPinPull FPinGetPull(const FPinIndex pin);
Note:
Input:
Return:
void FPinSetPull(const FPinIndex pin, FPinPull pull);
Note:
Input:
Return:
FPinDelay FPinGetDelay(const FPinIndex pin, FPinDelayDir dir, FPinDelayType type);
Note:
Input:
Return:
boolean FPinGetDelayEn(const FPinIndex pin, FPinDelayDir dir);
Note:
Input:
Return:
void FPinSetDelay(const FPinIndex pin, FPinDelayDir dir, FPinDelayType type, FPinDelay delay);
Note:
Input:
Return:
void FPinSetDelayEn(const FPinIndex pin, FPinDelayDir dir, boolean enable);
Note:
Input:
Return:
FPinDrive FPinGetDrive(const FPinIndex pin);
Note:
Input:
Return:
void FPinSetDrive(const FPinIndex pin, FPinDrive drive);
Note:
Input:
Return:
Note:
Input:
Return: