simplelink_cc2640r2_sdk_2_30_00_28的simple_peripheral例程内,通过PIN_getOutputValue()来读取PIN_ID(11)的值,通过CCS的断点发现Error:cannot load from non-primitive location,无法正确读取PIN的值,这是什么原因造成的?
谢谢!
Viki Shi:
例程代码是否有作修改?该报错的解释可以看下这边: e2e.ti.com/…/11696
user5342508:
回复 Viki Shi:
你好,
宏去掉了CC2640R2_LAUNCHXL,增加CC2640R2DK_4XS,但是看CC2640R2DK_4XS.c内定义的PIN,4×4 的 MAX IOID 是IOID_9 ,这个文件是有问题吗?需要修改才能使用?GPIO_PinConfig gpioPinConfigs[CC2640R2DK_4XS_GPIOCOUNT] = {/* Input pins */GPIOCC26XX_DIO_19 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING,/* Button 0 */GPIOCC26XX_DIO_12 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING,/* Button 1 */
/* Output pins */GPIOCC26XX_DIO_25 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,/* LED1 */GPIOCC26XX_DIO_27 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,/* LED2 */GPIOCC26XX_DIO_07 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,/* LED3 */GPIOCC26XX_DIO_06 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,/* LED4 */
};