C/C++ API Reference
Loading...
Searching...
No Matches
pw::digital_io::McuxpressoDigitalInOutInterrupt Class Reference

Overview

Provides input, output, and interrupt support for an MCUXpresso GPIO pin.

Interrupts are provided by IRQ "A" on the GPIO module.

Class-specific behaviors:

  • The direction of the pin cannot be changed after construction.
  • If configured as an output:
    • The default state on Enable is 0 (inactive).
    • Disable has no actual effect; unlike McuxpressoDigitalOut, the GPIO is not reverted to an input.
  • If configured as an input:
    • The input buffer for the pin must be enabled in the IO Pad Controller (IOPCTL) via the Input Buffer Enable (IBENA) bit.
    • The input polarity is affected by the Input Invert Enable (IIENA) bit on the corresponding IO Pad Controller (IOPCTL) register.

In general, only one line should be created per (port, pin) pair. Attempting to register multiple interrupt handlers on the same line will result in SetInterruptHandler returning pw::Status::AlreadyExists.

Inheritance diagram for pw::digital_io::McuxpressoDigitalInOutInterrupt:
pw::digital_io::DigitalInOutInterrupt pw::IntrusiveForwardList< T >::Item pw::digital_io::DigitalIoOptional

Public Member Functions

 McuxpressoDigitalInOutInterrupt (GPIO_Type *base, uint32_t port, uint32_t pin, bool output)
 
bool is_enabled () const
 Returns true if the line is enabled (in any state).
 
- Public Member Functions inherited from pw::digital_io::DigitalInOutInterrupt
Status ClearInterruptHandler ()
 
Status DisableInterruptHandler ()
 
Status EnableInterruptHandler ()
 
Result< State > GetState ()
 
Result< bool > IsStateActive ()
 
Status SetInterruptHandler (InterruptTrigger trigger, InterruptHandler &&handler)
 
Status SetState (State state)
 
Status SetStateActive ()
 
Status SetStateInactive ()
 
- Public Member Functions inherited from pw::digital_io::DigitalIoOptional
constexpr bool provides_input () const
 
constexpr bool provides_output () const
 
constexpr bool provides_interrupt () const
 
Result< State > GetState ()
 
Status SetState (State state)
 
Result< bool > IsStateActive ()
 
Status SetStateActive ()
 
Status SetStateInactive ()
 
Status SetInterruptHandler (InterruptTrigger trigger, InterruptHandler &&handler)
 
Status ClearInterruptHandler ()
 
Status EnableInterruptHandler ()
 
Status DisableInterruptHandler ()
 
Status Enable ()
 
Status Disable ()
 

Private Member Functions

pw::Status DoEnable (bool enable) override
 
pw::Result< pw::digital_io::State > DoGetState () override
 
pw::Status DoSetState (pw::digital_io::State state) override
 
pw::Status DoSetInterruptHandler (pw::digital_io::InterruptTrigger trigger, pw::digital_io::InterruptHandler &&handler) override
 
pw::Status DoEnableInterruptHandler (bool enable) override
 

Friends

void GPIO_INTA_DriverIRQHandler ()
 

Additional Inherited Members

- Protected Member Functions inherited from pw::IntrusiveForwardList< T >::Item
constexpr Item ()=default
 

The documentation for this class was generated from the following file: