我使用的CC2640R2F模块的SPI引脚IO8,IO9没有引出,而例程使用的就是这两个引脚,我可以直接在CC2640R2_LANUCHXL.H改别的其他引脚吗,是随便的引脚都可以,还是有特定的引脚;
Kevin Qiu1:
SPI0的话已经设置好了,SPI1可以自己定义成未使用的引脚
/* SPI Board */ #define CC2640R2_LAUNCHXL_SPI0_MISOIOID_8/* RF1.20 */ #define CC2640R2_LAUNCHXL_SPI0_MOSIIOID_9/* RF1.18 */ #define CC2640R2_LAUNCHXL_SPI0_CLKIOID_10/* RF1.16 */ #define CC2640R2_LAUNCHXL_SPI0_CSNIOID_11 #define CC2640R2_LAUNCHXL_SPI1_MISOPIN_UNASSIGNED #define CC2640R2_LAUNCHXL_SPI1_MOSIPIN_UNASSIGNED #define CC2640R2_LAUNCHXL_SPI1_CLKPIN_UNASSIGNED #define CC2640R2_LAUNCHXL_SPI1_CSNPIN_UNASSIGNED
yekun kun:
回复 Kevin Qiu1:
如过我使用其他引脚挂载SPI FLASH;
下面的引脚是否可以:
/* SPI */
#define CC2640R2_LAUNCHXL_SPI_FLASH_CSIOID_25//IOID_20《—————————–
#define CC2640R2_LAUNCHXL_FLASH_CS_ON0
#define CC2640R2_LAUNCHXL_FLASH_CS_OFF1/* SPI Board */
#define CC2640R2_LAUNCHXL_SPI0_MISOIOID_26//IOID_8/* RF1.20 */
#define CC2640R2_LAUNCHXL_SPI0_MOSIIOID_27//IOID_9/* RF1.18 */
#define CC2640R2_LAUNCHXL_SPI0_CLKIOID_28//IOID_10/* RF1.16 */
#define CC2640R2_LAUNCHXL_SPI0_CSNPIN_UNASSIGNED //IOID_25《—————————————————-还有我打箭头的地方,为啥也有两个SPI SC定义的地方?
是否也要改为IOID_25??
YiKai Chen:
回复 yekun kun:
只要沒用到重疊的io就可以