|
Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
|
EIC driver header file for Microchip eic g1 peripheral. More...
Go to the source code of this file.
Data Structures | |
| struct | eic_config_params |
| Parameters used to configure a Microchip EIC line for a GPIO pin. More... | |
Typedefs | |
| typedef void(* | mchp_eic_callback_t) (uint32_t pins, void *data) |
| EIC ISR callback used to notify the GPIO layer of an interrupt. | |
Enumerations | |
| enum | mchp_eic_trigger { MCHP_EIC_RISING = 1 , MCHP_EIC_FALLING , MCHP_EIC_BOTH , MCHP_EIC_HIGH , MCHP_EIC_LOW } |
| EIC interrupt trigger selection. More... | |
| enum | mchp_gpio_port_id { MCHP_PORT_ID0 = 0 , MCHP_PORT_ID1 , MCHP_PORT_ID2 , MCHP_PORT_ID3 , MCHP_PORT_ID_MAX } |
| Microchip GPIO port identifiers. More... | |
| enum | mchp_eic_line { EIC_LINE_0 = 0 , EIC_LINE_1 , EIC_LINE_2 , EIC_LINE_3 , EIC_LINE_4 , EIC_LINE_5 , EIC_LINE_6 , EIC_LINE_7 , EIC_LINE_8 , EIC_LINE_9 , EIC_LINE_10 , EIC_LINE_11 , EIC_LINE_12 , EIC_LINE_13 , EIC_LINE_14 , EIC_LINE_15 , EIC_LINE_MAX } |
| Microchip EIC (External Interrupt Controller) line identifiers. More... | |
Functions | |
| int | eic_mchp_config_interrupt (struct eic_config_params *eic_pin_config) |
| Configure and enable an EIC interrupt for a given pin. | |
| uint32_t | eic_mchp_interrupt_pending (uint8_t port_id) |
| Get the pending EIC interrupts for a given port. | |
| int | eic_mchp_disable_interrupt (struct eic_config_params *eic_pin_config) |
| Disables an EIC interrupt for a given pin configuration. | |
EIC driver header file for Microchip eic g1 peripheral.
This can be used to access the APIs implemented for the eic driver.
| typedef void(* mchp_eic_callback_t) (uint32_t pins, void *data) |
EIC ISR callback used to notify the GPIO layer of an interrupt.
| [in] | pins | Bitmask of GPIO pins that triggered (bit n => pin n). |
| [in] | data | User/driver context pointer associated with the GPIO port. |
| enum mchp_eic_line |
Microchip EIC (External Interrupt Controller) line identifiers.
| enum mchp_eic_trigger |
| enum mchp_gpio_port_id |
| int eic_mchp_config_interrupt | ( | struct eic_config_params * | eic_pin_config | ) |
Configure and enable an EIC interrupt for a given pin.
This function configures the EIC interrupt for the specified pin, including setting up the trigger type, enabling input, configuring debounce if required, and updating the internal data structures to reflect the new assignment of pin to an eic line.
| eic_pin_config | Pointer to the EIC pin configuration structure. |
| int eic_mchp_disable_interrupt | ( | struct eic_config_params * | eic_pin_config | ) |
Disables an EIC interrupt for a given pin configuration.
This function disables the EIC interrupt associated with the specified pin configuration. It checks if the pin is currently assigned to an EIC line, disables the interrupt line if so, and updates the internal data structures to mark the line as free.
| eic_pin_config | Pointer to the EIC pin configuration structure. |
Get the pending EIC interrupts for a given port.
This function checks which pins in the specified port have pending EIC interrupts. It returns a bitmask where each set bit corresponds to a pin with a pending interrupt.
| port_id | The identifier of the port to check for pending interrupts. |