Skip to content

3. API Changes for XMega

bombasticbob edited this page Oct 27, 2014 · 34 revisions

A few APIs have changed, out of necessity, to support the XMega.

attachInterrupt(port, callback, mode);

typical usage:   attachInterrupt(PORTD_INT0, // the specific interrupt vector
                  my_callback, // user-defined callback function
                  RISING // mode (LOW, HIGH, RISING, FALLING, CHANGE)
                  | INT_MODE_PIN_DEFAULT // the pin(s) to assign, default=2
                  | INT_MODE_PRI_DEFAULT); // interrupt priority

Clone this wiki locally