Other Parts Discussed in Thread: Z-STACK
I am using a CC2530 Generic board (similar to below) ) as an EndDevice. Using IAR workbench fro 8051 for compilation and using the SmartRF Flash Programmer to transfer the code to the board.
My Intent is to connect a LED in one of the Pins and control the On/OFF. By using the SampleLight program from z-stack, I am able to successfully connect and control the LED to some Pins - like P1_0, P1_1, P0_0. But I am unable to control in the pins I need like P2_1, P2_2, P0_7. Why is that I am able to control in some pins but not in others? Below are the changes I have done
in hal_board_cfg.h, I modify the LED1_SBIT with the appropriate pin I need. I also change the LED_DDR to P1DIR for pins starting with P1 or P0 or P2 depending on the pin on LED1_SBIT. Somehow it works with the some pins I stated above. What is it I am doing wrong? Also what is the "DDR" in LED1_DDR?
#define LED1_BV BV(0)
//#define LED1_SBIT P1_0
#define LED1_SBIT P1_0
#define LED1_DDR P1DIR
#define LED1_POLARITY ACTIVE_HIGH
I am calling "HAL_TOGGLE_LED1();" in callback function "zclSampleLight_OnOffCB" in zclsamplelight.c