请教各位专家:
我想驱动 12864 液晶屏,准备用 cs 片选,rw 数据, clk 时钟几个管脚进行串口驱动输出。
拟定义CC1310 几个PIN 对应上述几个管脚,有几个问题请教。
1、针对 PIN 定义
/* Analog capable DIOs */
#define CC1310_LAUNCHXL_DIO23_ANALOG IOID_23
#define CC1310_LAUNCHXL_DIO24_ANALOG IOID_24
#define CC1310_LAUNCHXL_DIO25_ANALOG IOID_25
#define CC1310_LAUNCHXL_DIO26_ANALOG IOID_26
#define CC1310_LAUNCHXL_DIO27_ANALOG IOID_27
#define CC1310_LAUNCHXL_DIO28_ANALOG IOID_28
#define CC1310_LAUNCHXL_DIO29_ANALOG IOID_29
#define CC1310_LAUNCHXL_DIO30_ANALOG IOID_30
/* Digital IOs */
#define CC1310_LAUNCHXL_DIO0 IOID_0
#define CC1310_LAUNCHXL_DIO1 IOID_1
#define CC1310_LAUNCHXL_DIO12 IOID_12
#define CC1310_LAUNCHXL_DIO15 IOID_15
#define CC1310_LAUNCHXL_DIO16_TDO IOID_16
#define CC1310_LAUNCHXL_DIO17_TDI IOID_17
#define CC1310_LAUNCHXL_DIO21 IOID_21
#define CC1310_LAUNCHXL_DIO22 IOID_22
上述 模拟 、数字管脚是否都可应用。
2、定义PIN TABLE
PIN_Config SpiPinTable[] = {
CC1310_LAUNCHXL_DIO17_TDI | PIN_GPIO_OUTPUT_EN |PIN_INPUT_EN| PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX,
CC1310_LAUNCHXL_DIO21 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX,
CC1310_LAUNCHXL_DIO22 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
PIN_TERMINATE
};
PIN CC1310_LAUNCHXL_DIO17_TDI 允许 输入并且可以输出,是否这样定义
CC1310_LAUNCHXL_DIO17_TDI | PIN_GPIO_OUTPUT_EN |PIN_INPUT_EN| PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX,
Viki Shi:
建议通过sysconfig来进行管脚定义,能直观地看到哪些引脚可用