Interrupts

Z-Uno uses hardware interrupts of Z-Wave chip as well as software generated interrupts provide users simple experience. Currently Z-Uno supports the following interrupts:
  • INT0 (pin 17)
  • INT1 (pin 18)
  • ZEROX (pin 3)
  • GPT (General Purpose Timer)
  • 1 milliseconds software timer
Interrupt handler functions should be defined in user sketch and «announced» using the corresponding ZUNO_SETUP_ISR_*(my_handler_func) macro, where my_handler_func is the name of the handler function. The code in the user interrupt handler function should be as fast as possible and should not contain ANY function calls except few listed below. Also don't use local variables — use global variables instead!
Function allowed in interrupt handlerLimitations
digitalRead(pin)pin: a constant or variable of type s_pin
digitalWrite(pin, value)pin: a constant or variable of type s_pin
digitalToggle(pin)pin: a constant or variable of type s_pin
pinMode(pin, mode)pin: a constant or variable of type s_pin
zunoExtIntMode(int_num, mode)constant int_num and mode
zunoGPTEnable(mode)mode: a constant
zunoGPTSet(value)-
zunoFastPWMEnable(mode)mode: a constant
zunoFastPWMSet(a, b)-
millis()(starting from 2.1.5)
ZUNO_SETUP_ISR_*(my_handler_func) * the name of the interrupt (see table below) my_handler_func the name of the user defined interrupt handler

Interrupt nameDescriptionMacro
INT0 rise/fall/changeRise, fall or change of voltage on INT0 pin (pin 17)ZUNO_SETUP_ISR_INT0(my_handler_func)
INT1 rise/fall/changeRise, fall or change of voltage on INT1 pin (pin 18)ZUNO_SETUP_ISR_INT1(my_handler_func)
ZEROX rise/fall/changeRise, fall or change of voltage on ZEROX pin (pin 3)ZUNO_SETUP_ISR_ZEROX(my_handler_func)
GPTGeneral purpose timer reached zeroZUNO_SETUP_ISR_GPTIMER(my_handler_func)
1 millisecond tickExecuted every 1 millisecondZUNO_SETUP_ISR_1MSTIMER(my_handler_func)