Jump to content
43oh

[Energia Library] StellarPad rc-switch library (info only)


Recommended Posts

  • 1 year later...

I adopt your code in clear C code IAR project by adding wiring.h

 

In my configuration i use pin PB5

void Init_rcswitch(void){

  ROM_GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_5); // configure PIN
  ROM_GPIOIntTypeSet(GPIO_PORTB_BASE, GPIO_PIN_5, GPIO_BOTH_EDGES); // invoke on any changes
  ROM_GPIOPinIntEnable(GPIO_PORTB_BASE, GPIO_PIN_5); // PB5
  IntEnable(INT_GPIOB); //sets the interrupt controller to interrupt on GPIO port B 
}
 
// our isr handle
void recv_PortPin(void){
        ROM_GPIOPinIntClear(GPIO_PORTB_BASE, GPIO_PIN_5);
 

 ....

last string is important :)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...