Ext Int Structures - PalouseRobosub/SUBLIBinal GitHub Wiki
External Interrupt Structures
This page contains information about the internal structures used for external interrupt configuration. Please refer to the following links to be redirected to the appropriate documentation.
Structures:
Interrupt Config
Definition
typedef struct INTERRUPT_CONFIG{
Interrupt extInt;
Pin pin;
Polarity polarity;
boolean enable;
Resistor resistor;
void *callback;
} Interrupt_Config;
The Interrupt_Config
structure is used for interrupt initialization and updating.
Parameters
- Interrupt extInt:
extInt
specifies which interrupt should be modified. Take note that for Interrupt_0, the pin may not be reconfigured. Interrupt_0 will always use Pin B7. - Pin pin:
pin
specifies which pin should be used as the interrupt trigger. To see available pins, please refer to the pin documentation. - Polarity polarity: this specifies what type of edge an interrupt should be triggered on.
- boolean enable: this defines whether an interrupt is enabled on initialization or not.
- Resistor resistor: this specifies whether a pull-up or pull-down resistor should be used internally.
- void * callback: This is the callback function that will be triggered when an interrupt is generated. Please refer to the callback function for more information.