Handler of a Pin Change Interrupt vector.
More...
#include <fastarduino/pci.h>
template<uint8_t PCINT_>
class interrupt::PCISignal< PCINT_ >
Handler of a Pin Change Interrupt vector.
For each PCINT vector you need, you must create one instance of this handler. With one instance, you are then able to handle individually each pin which interrupt you want to enable or disable. If you need a function or method to be called back when a Pin Change Interrupt occurs for a PCINT vector, then you have to use REGISTER_PCI_ISR_FUNCTION
or REGISTER_PCI_ISR_METHOD()
macros. If you don't then use REGISTER_PCI_ISR_EMPTY()
macro. If you don't know the PCINT you need to handle but only a pin, then you can use PCI_SIGNAL<PIN>
.
- Template Parameters
-
PCINT_ | the PCINT vector you want to manage |
- See also
- REGISTER_PCI_ISR_FUNCTION
-
REGISTER_PCI_ISR_METHOD
-
REGISTER_PCI_ISR_EMPTY
-
PCIType
-
PCI_SIGNAL
Definition at line 176 of file pci.h.
◆ enable()
Enable pin change interrupts handled by this PCISignal
.
Enabling interrupts on a PCINT is not sufficient, you should enable pin change interrupts for each individual pin you are interested in, with enable_pin()
or enable_pins()
. Note that this method is synchronized, i.e. it disables all interrupts during its call and restores interrupts on return. If you do not need synchronization, then you should better use enable_()
instead.
- See also
- enable_()
-
disable()
-
enable_pin()
-
enable_pins()
Definition at line 211 of file pci.h.
◆ disable()
Disable all pin change interrupts handled by this PCISignal
.
If you need to only diable pin change interrupts for some pins of that PCINT, then use disable_pin()
instead. Note that this method is synchronized, i.e. it disables all interrupts during its call and restores interrupts on return. If you do not need synchronization, then you should better use disable_()
instead.
- See also
- enable()
-
disable_()
-
disable_pin()
Definition at line 228 of file pci.h.
◆ clear()
Clear the interrupt flag for this pin change interrupt vector.
Generally, you would not need this method as that interrupt flag automatically gets cleared when the matching ISR is executed. Note that this method is synchronized, i.e. it disables all interrupts during its call and restores interrupts on return. If you do not need synchronization, then you should better use clear_()
instead.
- See also
- clear_()
Definition at line 243 of file pci.h.
◆ set_enable_pins()
Set the exact list of pins, in this PCINT, for which Pin Change Interrupts must be enabled.
For other pins, interrupts will be disabled. This method provides no compile-time safety net if you pass a wrong mask. Note that this method is synchronized, i.e. it disables all interrupts during its call and restores interrupts on return. If you do not need synchronization, then you should better use set_enable_pins_()
instead.
- Parameters
-
mask | the mask of pin bits which pin change interrupts you want to enable for this PCINT; other pins will have interrupts disabled. |
- See also
- set_enable_pins_()
-
enable_pins()
-
disable_pins()
Definition at line 262 of file pci.h.
◆ enable_pins()
Enable pin change interrupts for several pins of this PCINT.
This does not enable completely interrupts, for this you need to also call enable()
. This method is useful when you have several pins to enable at once; if you have only one pin, then enable_pin()
is preferred. This method provides no compile-time safety net if you pass a wrong mask. Note that this method is synchronized, i.e. it disables all interrupts during its call and restores interrupts on return. If you do not need synchronization, then you should better use enable_pins_()
instead.
- Parameters
-
mask | the mask of pin bits which pin change interrupts you want to enable for this PCINT; only pins included in mask will be affected; if other pins are already enabled, they won't be changed. |
- See also
- enable()
-
enable_pins_()
-
enable_pin()
-
disable_pin()
Definition at line 286 of file pci.h.
◆ disable_pins()
Disable pin change interrupts for several pins of this PCINT.
This does not disable completely interrupts, for this you need to also call disable()
. This method is useful when you have several pins to disable at once; if you have only one pin, then disable_pin()
is preferred. This method provides no compile-time safety net if you pass a wrong mask. Note that this method is synchronized, i.e. it disables all interrupts during its call and restores interrupts on return. If you do not need synchronization, then you should better use disable_pins_()
instead.
- Parameters
-
mask | the mask of pin bits which pin change interrupts you want to disable for this PCINT; only pins included in mask will be affected; if other pins are already enabled, they won't be changed. |
- See also
- disable()
-
disable_pins_()
-
enable_pin()
-
disable_pin()
Definition at line 310 of file pci.h.
◆ enable_pin()
Enable Pin Change Interrupts for PIN
.
Note that this method is synchronized, i.e. it disables all interrupts during its call and restores interrupts on return. If you do not need synchronization, then you should better use enable_pin_()
instead.
- Template Parameters
-
PIN | the pin for which to enable Pin Change Interrupts; this must belong to the handler's PCINT and must support Pin Change Interrupts, otherwise compilation will fail. |
- See also
- enable_pin_()
-
disable_pin()
-
enable_pins()
Definition at line 328 of file pci.h.
◆ disable_pin()
Disable Pin Change Interrupts for PIN
.
Note that this method is synchronized, i.e. it disables all interrupts during its call and restores interrupts on return. If you do not need synchronization, then you should better use disable_pin_()
instead.
- Template Parameters
-
PIN | the pin for which to disable Pin Change Interrupts; this must belong to the handler's PCINT and must support Pin Change Interrupts, otherwise compilation will fail. |
- See also
- disable_pin_()
-
enable_pin()
Definition at line 346 of file pci.h.
◆ enable_()
Enable pin change interrupts for this PCISignal
.
Enabling interrupts is not sufficient, you should enable pin change interrupts for each individual pin you are interested in, with enable_pin()
or enable_pins()
. Note that this method is not synchronized, hence you should ensure it is called only while global interrupts are not enabled. If you need synchronization, then you should better use enable()
instead.
- See also
- enable()
-
disable_()
-
enable_pin_()
-
enable_pins_()
Definition at line 366 of file pci.h.
◆ disable_()
Disable all pin change interrupts for this PCISignal
.
If you need to only diable pin change interrupts for some pins of that PCINT, then use disable_pin()
instead. Note that this method is not synchronized, hence you should ensure it is called only while global interrupts are not enabled. If you need synchronization, then you should better use disable()
instead.
- See also
- enable()
-
disable()
-
disable_pin_()
Definition at line 383 of file pci.h.
◆ clear_()
Clear the interrupt flag for this pin change interrupt vector.
Generally, you would not need this method as that interrupt flag automatically gets cleared when the matching ISR is executed. Note that this method is not synchronized, hence you should ensure it is called only while global interrupts are not enabled. If you need synchronization, then you should better use clear()
instead.
- See also
- clear()
Definition at line 398 of file pci.h.
◆ set_enable_pins_()
Set the exact list of pins, in this PCINT, for which Pin Change Interrupts must be enabled.
For other pins, interrupts will be disabled. This method provides no compile-time safety net if you pass a wrong mask. Note that this method is not synchronized, hence you should ensure it is called only while global interrupts are not enabled. If you need synchronization, then you should better use set_enable_pins()
instead.
- Parameters
-
mask | the mask of pin bits which pin change interrupts you want to enable for this PCINT; other pins will have interrupts disabled. |
- See also
- set_enable_pins()
-
enable_pins_()
-
disable_pins_()
Definition at line 417 of file pci.h.
◆ enable_pins_()
Enable pin change interrupts for several pins of this PCINT.
This does not enable completely interrupts, for this you need to also call enable_()
. This method is useful when you have several pins to enable at once; if you have only one pin, then enable_pin_()
is preferred. This method provides no compile-time safety net if you pass a wrong mask. Note that this method is not synchronized, hence you should ensure it is called only while global interrupts are not enabled. If you need synchronization, then you should better use enable_pin()
instead.
- Parameters
-
mask | the mask of pin bits which pin change interrupts you want to enable for this PCINT; only pins included in mask will be affected; if other pins are already enabled, they won't be changed. |
- See also
- enable_()
-
enable_pins()
-
enable_pin_()
-
disable_pin_()
Definition at line 441 of file pci.h.
◆ disable_pins_()
Disable pin change interrupts for several pins of this PCINT.
This does not disable completely interrupts, for this you need to also call disable_()
. This method is useful when you have several pins to disable at once; if you have only one pin, then disable_pin_()
is preferred. This method provides no compile-time safety net if you pass a wrong mask. Note that this method is not synchronized, hence you should ensure it is called only while global interrupts are not enabled. If you need synchronization, then you should better use disable_pin()
instead.
- Parameters
-
mask | the mask of pin bits which pin change interrupts you want to disable for this PCINT; only pins included in mask will be affected; if other pins are already enabled, they won't be changed. |
- See also
- disable_()
-
disable_pins()
-
enable_pin_()
-
disable_pin_()
Definition at line 465 of file pci.h.
◆ enable_pin_()
Enable Pin Change Interrupts for PIN
.
Note that this method is not synchronized, hence you should ensure it is called only while global interrupts are not enabled. If you need synchronization, then you should better use enable_pin()
instead.
- Template Parameters
-
PIN | the pin for which to enable Pin Change Interrupts; this must belong to the handler's PCINT and must support Pin Change Interrupts, otherwise compilation will fail. |
- See also
- enable_pin()
-
disable_pin_()
-
enable_pins_()
Definition at line 483 of file pci.h.
◆ disable_pin_()
Disable Pin Change Interrupts for PIN
.
Note that this method is not synchronized, hence you should ensure it is called only while global interrupts are not enabled. If you need synchronization, then you should better use disable_pin()
instead.
- Template Parameters
-
PIN | the pin for which to disable Pin Change Interrupts; this must belong to the handler's PCINT and must support Pin Change Interrupts, otherwise compilation will fail. |
- See also
- disable_pin()
-
enable_pin_()
Definition at line 501 of file pci.h.
◆ PCINT
The documentation for this class was generated from the following file: