Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
intc_nxp_gint.h File Reference

NXP Grouped GPIO Input Interrupt (GINT) driver API. More...

#include <zephyr/types.h>
#include <zephyr/device.h>

Go to the source code of this file.

Data Structures

struct  nxp_gint_group_config
 GINT group configuration. More...

Typedefs

typedef void(* nxp_gint_callback_t) (const struct device *dev, void *user_data)
 GINT callback function type.

Enumerations

enum  nxp_gint_trigger_type { NXP_GINT_TRIG_EDGE = 0 , NXP_GINT_TRIG_LEVEL = 1 }
 GINT trigger types. More...
enum  nxp_gint_combination_type { NXP_GINT_COMB_OR = 0 , NXP_GINT_COMB_AND = 1 }
 GINT combination logic. More...
enum  nxp_gint_polarity_type { NXP_GINT_POL_LOW = 0 , NXP_GINT_POL_HIGH = 1 }
 GINT pin polarity. More...

Functions

int nxp_gint_configure_group (const struct device *dev, const struct nxp_gint_group_config *config)
 Configure GINT settings.
int nxp_gint_enable_pin (const struct device *dev, uint8_t port, uint8_t pin, nxp_gint_polarity_type polarity)
 Enable a pin for GINT.
int nxp_gint_disable_pin (const struct device *dev, uint8_t port, uint8_t pin)
 Disable a pin for GINT.
bool nxp_gint_is_pending (const struct device *dev)
 Check if GINT interrupt is pending.
int nxp_gint_clear_pending (const struct device *dev)
 Clear GINT interrupt pending status.
int nxp_gint_register_callback (const struct device *dev, nxp_gint_callback_t callback, void *user_data)
 Register GINT callback.

Detailed Description

NXP Grouped GPIO Input Interrupt (GINT) driver API.

Typedef Documentation

◆ nxp_gint_callback_t

typedef void(* nxp_gint_callback_t) (const struct device *dev, void *user_data)

GINT callback function type.

Parameters
devGINT device
user_dataUser defined data

Enumeration Type Documentation

◆ nxp_gint_combination_type

GINT combination logic.

Enumerator
NXP_GINT_COMB_OR 

OR logic - any enabled pin triggers interrupt.

NXP_GINT_COMB_AND 

AND logic - all enabled pins must trigger interrupt.

◆ nxp_gint_polarity_type

GINT pin polarity.

Enumerator
NXP_GINT_POL_LOW 

Active LOW.

NXP_GINT_POL_HIGH 

Active HIGH.

◆ nxp_gint_trigger_type

GINT trigger types.

Enumerator
NXP_GINT_TRIG_EDGE 

Edge triggered.

NXP_GINT_TRIG_LEVEL 

Level triggered.

Function Documentation

◆ nxp_gint_clear_pending()

int nxp_gint_clear_pending ( const struct device * dev)

Clear GINT interrupt pending status.

Parameters
devGINT device
Returns
0 on success, negative errno on failure

◆ nxp_gint_configure_group()

int nxp_gint_configure_group ( const struct device * dev,
const struct nxp_gint_group_config * config )

Configure GINT settings.

Parameters
devGINT device
configGroup configuration
Returns
0 on success, negative errno on failure

◆ nxp_gint_disable_pin()

int nxp_gint_disable_pin ( const struct device * dev,
uint8_t port,
uint8_t pin )

Disable a pin for GINT.

Parameters
devGINT device
portPort number
pinPin number (0-31)
Returns
0 on success, negative errno on failure

◆ nxp_gint_enable_pin()

int nxp_gint_enable_pin ( const struct device * dev,
uint8_t port,
uint8_t pin,
nxp_gint_polarity_type polarity )

Enable a pin for GINT.

Parameters
devGINT device
portPort number
pinPin number (0-31)
polarityPin polarity
Returns
0 on success, negative errno on failure

◆ nxp_gint_is_pending()

bool nxp_gint_is_pending ( const struct device * dev)

Check if GINT interrupt is pending.

Parameters
devGINT device
Returns
true if interrupt is pending, false otherwise

◆ nxp_gint_register_callback()

int nxp_gint_register_callback ( const struct device * dev,
nxp_gint_callback_t callback,
void * user_data )

Register GINT callback.

Parameters
devGINT device
callbackCallback function to register
user_dataUser defined data to pass to callback
Returns
0 on success, negative errno on failure