Zephyr API 3.6.99
Loading...
Searching...
No Matches
intc_mchp_xec_ecia.h File Reference
#include <zephyr/device.h>
#include <zephyr/irq.h>

Go to the source code of this file.

Typedefs

typedef void(* mchp_xec_ecia_callback_t) (int girq_id, int src, void *user)
 

Functions

int mchp_xec_ecia_enable (int girq_id, int src)
 Driver for External interrupt controller in Microchip XEC devices.
 
int mchp_xec_ecia_info_enable (int ecia_info)
 enable EXTI interrupt for specific line specified by parameter encoded with MCHP_XEC_ECIA macro.
 
int mchp_xec_ecia_disable (int girq_id, int src)
 disable EXTI interrupt for specific line
 
int mchp_xec_ecia_info_disable (int ecia_info)
 disable EXTI interrupt for specific line specified by parameter encoded with MCHP_XEC_ECIA macro.
 
int mchp_xec_ecia_set_callback (int girq_id, int src, mchp_xec_ecia_callback_t cb, void *data)
 set GIRQn interrupt source callback
 
int mchp_xec_ecia_info_set_callback (int ecia_info, mchp_xec_ecia_callback_t cb, void *data)
 set GIRQn interrupt source callback
 
int mchp_xec_ecia_set_callback_by_dev (const struct device *dev_girq, int src, mchp_xec_ecia_callback_t cb, void *data)
 set GIRQn interrupt source callback
 
int mchp_ecia_unset_callback (int girq_id, int src)
 unset GIRQn interrupt source callback
 
int mchp_ecia_unset_callback_by_dev (const struct device *dev_girq, int src)
 unset GIRQn interrupt source callback
 
void mchp_xec_ecia_girq_aggr_en (uint8_t girq_id, uint8_t enable)
 enable or disable aggregated GIRQ output
 
void mchp_xec_ecia_girq_src_clr (uint8_t girq_id, uint8_t src_bit)
 clear GIRQ latched source status bit
 
void mchp_xec_ecia_girq_src_en (uint8_t girq_id, uint8_t src_bit)
 enable a source in a GIRQ
 
void mchp_xec_ecia_girq_src_dis (uint8_t girq_id, uint8_t src_bit)
 disable a source in a GIRQ
 
void mchp_xec_ecia_girq_src_clr_bitmap (uint8_t girq_id, uint32_t bitmap)
 clear GIRQ latches sources specified in bitmap
 
void mchp_xec_ecia_girq_src_en_bitmap (uint8_t girq_id, uint32_t bitmap)
 enable sources in a GIRQ
 
void mchp_xec_ecia_girq_src_dis_bitmap (uint8_t girq_id, uint32_t bitmap)
 disable sources in a GIRQ
 
uint32_t mchp_xec_ecia_girq_result (uint8_t girq_id)
 Read GIRQ result register (bit-wise OR of enable and source)
 
void mchp_xec_ecia_nvic_clr_pend (uint32_t nvic_num)
 Clear external NVIC input pending status.
 
void mchp_xec_ecia_info_girq_aggr_en (int ecia_info, uint8_t enable)
 enable or disable aggregated GIRQ output
 
void mchp_xec_ecia_info_girq_src_clr (int ecia_info)
 clear GIRQ latched source status bit
 
void mchp_xec_ecia_info_girq_src_en (int ecia_info)
 enable a source in a GIRQ
 
void mchp_xec_ecia_info_girq_src_dis (int ecia_info)
 disable a source in a GIRQ
 
uint32_t mchp_xec_ecia_info_girq_result (int ecia_info)
 Read GIRQ result register (bit-wise OR of enable and source)
 
void mchp_xec_ecia_info_nvic_clr_pend (int ecia_info)
 Clear external NVIC input pending status given encoded ECIA info.
 

Typedef Documentation

◆ mchp_xec_ecia_callback_t

typedef void(* mchp_xec_ecia_callback_t) (int girq_id, int src, void *user)

Function Documentation

◆ mchp_ecia_unset_callback()

int mchp_ecia_unset_callback ( int girq_id,
int src )

unset GIRQn interrupt source callback

Parameters
girq_idis the GIRQ number (8 - 26)
srcis the interrupt source in the GIRQ (0 - 31)

◆ mchp_ecia_unset_callback_by_dev()

int mchp_ecia_unset_callback_by_dev ( const struct device * dev_girq,
int src )

unset GIRQn interrupt source callback

Parameters
dev_girqis a handle to the GIRQn device
srcis the interrupt source in the GIRQ (0 - 31)

◆ mchp_xec_ecia_disable()

int mchp_xec_ecia_disable ( int girq_id,
int src )

disable EXTI interrupt for specific line

Parameters
girq_idis the GIRQ number (8 - 26)
srcis the interrupt source in the GIRQ (0 - 31)

◆ mchp_xec_ecia_enable()

int mchp_xec_ecia_enable ( int girq_id,
int src )

Driver for External interrupt controller in Microchip XEC devices.

Based on reference manuals: Reference Manuals for MEC152x and MEC172x ARM(r) 32-bit MCUs

Chapter: EC Interrupt Aggregator (ECIA)

enable GIRQn interrupt for specific source

Parameters
girq_idis the GIRQ number (8 - 26)
srcis the interrupt source in the GIRQ (0 - 31)

◆ mchp_xec_ecia_girq_aggr_en()

void mchp_xec_ecia_girq_aggr_en ( uint8_t girq_id,
uint8_t enable )

enable or disable aggregated GIRQ output

Parameters
girq_idis the GIRQ number (8 - 26)
enablenon-zero enables aggregated output else disables

◆ mchp_xec_ecia_girq_result()

uint32_t mchp_xec_ecia_girq_result ( uint8_t girq_id)

Read GIRQ result register (bit-wise OR of enable and source)

Parameters
girq_idis the GIRQ number (8 - 26)
Returns
32-bit unsigned result register value

◆ mchp_xec_ecia_girq_src_clr()

void mchp_xec_ecia_girq_src_clr ( uint8_t girq_id,
uint8_t src_bit )

clear GIRQ latched source status bit

Parameters
girq_idis the GIRQ number (8 - 26)
src_bitis the source bit position in the GIRQ registers (0 - 31)

◆ mchp_xec_ecia_girq_src_clr_bitmap()

void mchp_xec_ecia_girq_src_clr_bitmap ( uint8_t girq_id,
uint32_t bitmap )

clear GIRQ latches sources specified in bitmap

Parameters
girq_idis the GIRQ number (8 - 26)
bitmapcontains the source bits to clear

◆ mchp_xec_ecia_girq_src_dis()

void mchp_xec_ecia_girq_src_dis ( uint8_t girq_id,
uint8_t src_bit )

disable a source in a GIRQ

Parameters
girq_idis the GIRQ number (8 - 26)
src_bitis the source bit position in the GIRQ registers (0 - 31)

◆ mchp_xec_ecia_girq_src_dis_bitmap()

void mchp_xec_ecia_girq_src_dis_bitmap ( uint8_t girq_id,
uint32_t bitmap )

disable sources in a GIRQ

Parameters
girq_idis the GIRQ number (8 - 26)
bitmapcontains the source bits to disable

◆ mchp_xec_ecia_girq_src_en()

void mchp_xec_ecia_girq_src_en ( uint8_t girq_id,
uint8_t src_bit )

enable a source in a GIRQ

Parameters
girq_idis the GIRQ number (8 - 26)
src_bitis the source bit position in the GIRQ registers (0 - 31)

◆ mchp_xec_ecia_girq_src_en_bitmap()

void mchp_xec_ecia_girq_src_en_bitmap ( uint8_t girq_id,
uint32_t bitmap )

enable sources in a GIRQ

Parameters
girq_idis the GIRQ number (8 - 26)
bitmapcontains the source bits to enable

◆ mchp_xec_ecia_info_disable()

int mchp_xec_ecia_info_disable ( int ecia_info)

disable EXTI interrupt for specific line specified by parameter encoded with MCHP_XEC_ECIA macro.

Parameters
ecia_infois GIRQ connection encoded with MCHP_XEC_ECIA

◆ mchp_xec_ecia_info_enable()

int mchp_xec_ecia_info_enable ( int ecia_info)

enable EXTI interrupt for specific line specified by parameter encoded with MCHP_XEC_ECIA macro.

Parameters
ecia_infois GIRQ connection encoded with MCHP_XEC_ECIA

◆ mchp_xec_ecia_info_girq_aggr_en()

void mchp_xec_ecia_info_girq_aggr_en ( int ecia_info,
uint8_t enable )

enable or disable aggregated GIRQ output

Parameters
ecia_infois GIRQ connection encoded with MCHP_XEC_ECIA
enableis flag to indicate enable(1) or disable(0)

◆ mchp_xec_ecia_info_girq_result()

uint32_t mchp_xec_ecia_info_girq_result ( int ecia_info)

Read GIRQ result register (bit-wise OR of enable and source)

Parameters
ecia_infois GIRQ connection encoded with MCHP_XEC_ECIA
Returns
32-bit unsigned result register value

◆ mchp_xec_ecia_info_girq_src_clr()

void mchp_xec_ecia_info_girq_src_clr ( int ecia_info)

clear GIRQ latched source status bit

Parameters
ecia_infois GIRQ connection encoded with MCHP_XEC_ECIA

◆ mchp_xec_ecia_info_girq_src_dis()

void mchp_xec_ecia_info_girq_src_dis ( int ecia_info)

disable a source in a GIRQ

Parameters
ecia_infois GIRQ connection encoded with MCHP_XEC_ECIA

◆ mchp_xec_ecia_info_girq_src_en()

void mchp_xec_ecia_info_girq_src_en ( int ecia_info)

enable a source in a GIRQ

Parameters
ecia_infois GIRQ connection encoded with MCHP_XEC_ECIA

◆ mchp_xec_ecia_info_nvic_clr_pend()

void mchp_xec_ecia_info_nvic_clr_pend ( int ecia_info)

Clear external NVIC input pending status given encoded ECIA info.

Parameters
ecia_infois GIRQ connection encoded with MCHP_XEC_ECIA

◆ mchp_xec_ecia_info_set_callback()

int mchp_xec_ecia_info_set_callback ( int ecia_info,
mchp_xec_ecia_callback_t cb,
void * data )

set GIRQn interrupt source callback

Parameters
ecia_infois GIRQ connection encoded with MCHP_XEC_ECIA
cbuser callback
datauser data

◆ mchp_xec_ecia_nvic_clr_pend()

void mchp_xec_ecia_nvic_clr_pend ( uint32_t nvic_num)

Clear external NVIC input pending status.

Parameters
nvic_numis 0 to maximum NVIC inputs for the chip.

◆ mchp_xec_ecia_set_callback()

int mchp_xec_ecia_set_callback ( int girq_id,
int src,
mchp_xec_ecia_callback_t cb,
void * data )

set GIRQn interrupt source callback

Parameters
girq_idis the GIRQ number (8 - 26)
srcis the interrupt source in the GIRQ (0 - 31)
cbuser callback
datauser data

◆ mchp_xec_ecia_set_callback_by_dev()

int mchp_xec_ecia_set_callback_by_dev ( const struct device * dev_girq,
int src,
mchp_xec_ecia_callback_t cb,
void * data )

set GIRQn interrupt source callback

Parameters
dev_girqis a handle to the GIRQn device
srcis the interrupt source in the GIRQ (0 - 31)
cbuser callback
datauser data