Skip to content
George edited this page May 24, 2019 · 3 revisions

In order for a program to be interrupted from it's normal workflow or sleep mode and jump to a specific function, an ISR or Interrupt Service Routine must be defined. CC430 supports interrupt vectors originating from a Pin, Timer, WDT, RF packet or RTC. By default, RF packets are received as an interrupt for processing. Arduino specific interrupt functions are supported within panStamp's NRG as well as AVR. Interrupt specific functions are as they follow:

timer1a0.attachInterrupt(function); //Timer1 based interrupt that calls the ISR 'function' when the timer overflows.
attachInterrupt(pin, function, mode); //Sets a specific 'pin' as an interrupt, then calls the ISR 'function' if the mode is reached. Mode can be RISING, FALLING or CHANGE. Alternatively but not recommended are the modes HIGH and LOW.
detachInterrupt(pin); //Stops the pin from being used as an interrupt vector.
noInterrupts(); //Disables all interrupts (GIE) including the RF interrupt.
interrupts(); //(Re)enables all interrupts (GIE) including the RF interrupt.

Anti Swap

API for Anti Swap

Clone this wiki locally