26 #ifdef DRV_DIO_MODULE_ENABLED 86 #ifndef DRV_HANDLE_CHECK_INACTIVE 87 #define DRV_HANDLE_CHECK(handle); \ 88 if((handle).ptGPIODevice==0||(handle).ptMMIODevice==0||(handle).ptPIODevice==0){ \ 92 #define DRV_HANDLE_CHECK(handle) ; 372 #ifdef DRV_DIO_PIO_IRQ_SUPPORTED 579 #ifdef DRV_DIO_PIO_INVERT_SUPPORTED 841 if(seqBitLength > 0x1fu || cntr > 0x3u || once > 0x1ul || ulChannelID >
DRV_DIO_ID_GPIO_MAX)
876 #ifdef DRV_DIO_PIO_IRQ_SUPPORTED 932 #ifdef DRV_DIO_PIO_IRQ_SUPPORTED 1005 #ifdef DRV_DIO_PIO_IRQ_SUPPORTED 1016 switch (ulChannelID)
1239 if((ch & 0x01u << i) > 0)
1287 if((ch & 0x01u << i) > 0)
1323 (*pullChannels) = 0x00ull;
1327 (*pullChannels) <<= 32;
1371 static unsigned const int nr = 0;
1399 static unsigned const int nr = 1;
1427 static unsigned const int nr = 2;
1455 static unsigned const int nr = 3;
1483 static unsigned const int nr = 4;
1511 static unsigned const int nr = 5;
1539 static unsigned const int nr = 6;
1568 static unsigned const int nr = 7;
1597 static unsigned const int nr = 12;
1661 #ifdef DRV_DIO_PIO_IRQ_SUPPORTED 1686 uint32_t ulChannelID = 0;
1687 uint32_t ulMSK = 0x01u;
#define DRV_DIO_ID_GPIO_5
static __INLINE void DRV_DIO_SetPIO(uint32_t ulChannel)
Helper function.
struct hif_io_ctrl_Type::@3962::@3991 hif_pio_cfg_b
#define DRV_DIO_ID_GPIO_0
__IOM uint32_t mmio_pio_oe_line_cfg0
The handle of the driver.
void * s_apIRQHandlerHandles[DRV_DIO_IRQ_COUNT]
__IM uint32_t gpio_app_in
__IOM uint32_t mmio_pio_oe_line_set_cfg0
DRV_STATUS_E DRV_DIO_ChannelIRQUnmask(DRV_DIO_ID_T ulChannelID)
This function unmasks a io channels interrupt.
#define DRV_GPIO_IRQ_COUNT
void GPIO0_IRQHandler(void)
__IOM uint32_t gpio_app_irq_raw
__IOM uint32_t mmio_pio_out_line_reset_cfg0
DRV_DIO_MODE_E
The mode of the DIO.
DRV_HIF_IO_DEVICE_T * ptHIFIODevice
#define DRV_DIO_LINE_MSK_HIF
void DRV_NVIC_DisableIRQ(IRQn_Type IRQn)
This method disables a given interrupt.
#define DRV_DIO_ID_HIF_A17
#define DRV_HIF_IRQ_COUNT
DRV_GPIO_DEVICE_T * ptGPIODevice
DRV_STATUS_E DRV_DIO_LineInGet(DRV_DIO_LINE_E eLine, DRV_DIO_MSK_T *const pullChannels)
This function stores the state readable of all channels of all given lines into the channel value...
struct gpio_app_Type::@5163::@5193 gpio_app_cfg_b[8]
__IOM uint32_t hif_pio_cfg
void GPIO7_IRQHandler(void)
#define DRV_DIO_LINE_MSK_MMIO
static __INLINE void DRV_DIO_ReadModeHIF(uint64_t ulChannel)
Helper function.
__IOM uint32_t mmio_pio_oe_line_reset_cfg0
__IOM uint32_t hif_pio_irq_arm_mask_reset
#define DRV_DIO_ID_HIF_DIRQ
static __INLINE void DRV_DIO_ResetPIO(uint32_t ulChannel)
Helper function.
#define DRV_DIO_LINE_MSK_PIO
DRV_STATUS_E DRV_DIO_ChannelOutReset(DRV_DIO_ID_T ulChannelID)
This function sets the mode of the specified channel to reset (low or inverted low).
__IOM uint32_t gpio_app_line
void DRV_NVIC_EnableIRQ(IRQn_Type IRQn)
This method enables a given interrupt.
DRV_DIO_STATE_E
The state of the io port.
DRV_STATUS_E DRV_DIO_LineOutEnableReset(DRV_DIO_LINE_E eLine, DRV_DIO_MSK_T ullChannels)
This function Disables output capability on the channels defined.
__IM uint32_t hif_pio_in1
__IOM uint32_t pio_edge_event
#define DRV_HANDLE_CHECK(handle)
DRV_STATUS_E DRV_DIO_LineOutSet(DRV_DIO_LINE_E eLine, DRV_DIO_MSK_T ullChannels)
This function sets the channels defined.
#define DRV_DIO_ID_GPIO_1
#define DRV_DIO_ID_GPIO_6
#define DRV_DIO_ID_GPIO_2
static __INLINE void DRV_DIO_SetHIF(uint64_t ulChannel)
Helper function.
DRV_STATUS_E DRV_DIO_ChannelOutToggle(DRV_DIO_ID_T ulChannelID)
This function toggles the mode of the specified channel if it was set or reset before (from high to l...
#define DRV_DIO_LINE_MSK_GPIO
DRV_STATUS_E DRV_DIO_LineOutReset(DRV_DIO_LINE_E eLine, DRV_DIO_MSK_T ullChannels)
This function resets the channels defined.
#define gpio_app_gpio_app_irq_mask_rst_gpio_app4_Msk
void DRV_DIO_GPIO3_Callback(void)
This is the callback of the GPIO 3 IRQ.
static __INLINE void DRV_DIO_ReadModeMMIO(uint32_t ulChannel)
Helper function.
__STATIC_INLINE int DRV_IRQ_Enable(void)
This is a semaphore function for nested enabling the interrupts.
DRV_STATUS_E DRV_DIO_LineMaskedSet(DRV_DIO_LINE_E eLine, DRV_DIO_MSK_T ullMask, DRV_DIO_MSK_T ullChannels)
This function sets the channels defined by the mask.
#define gpio_app_gpio_app_irq_mask_rst_gpio_app1_Msk
DRV_STATUS_E DRV_DIO_ChannelSetMode(DRV_DIO_ID_T ulChannelID, DRV_DIO_MODE_E eMode)
This function (re)initializes a specific channel and sets its mode.
DRV_STATUS_E DRV_DIO_ChannelBlink(DRV_DIO_ID_T ulChannelID, unsigned int sequence, unsigned int seqBitLength, unsigned int cntr, unsigned int once)
__IM uint32_t hif_pio_in0
void GPIO6_IRQHandler(void)
#define DRV_DIO_ID_MMIO_MIN
#define DRV_PIO_IRQ_COUNT
static __INLINE void DRV_DIO_ResetMMIO(uint32_t ulChannel)
Helper function.
#define gpio_app_gpio_app_irq_mask_rst_gpio_app0_Msk
#define hif_io_ctrl_hif_pio_irq_raw_irq_hif_d12_Msk
#define DRV_DIO_ID_GPIO_MIN
DRV_STATUS_E DRV_DIO_HifIRQFilterDisable(void)
This function deactivates the filter on the HIF channels regarding the interrupt sampling.
void DRV_DIO_PIO_Callback(void)
This is the callback of the PIO0 IRQ.
DRV_DIO_HANDLE_T const s_tIODriver
__IOM uint32_t hif_pio_out1
#define gpio_app_gpio_app_irq_mask_rst_gpio_app5_Msk
uint64_t DRV_DIO_MSK_T
Type definition for the driver io channel mask.
void DRV_DIO_HIFPIO_Callback(void)
This is the callback of the HIFPIO IRQ.
This file contains all the functions prototypes for the peripheral module driver. ...
__IM uint32_t mmio_in_line_status0
void GPIO2_IRQHandler(void)
DRV_STATUS_E DRV_DIO_ChannelInvert(DRV_DIO_ID_T ulChannelID)
This function inverts the input/output of a specific channel.
void HIFPIO_IRQHandler(void)
DRV_STATUS_E DRV_DIO_HifIRQFilterEnable(void)
This function activates the filter on the HIF channels regarding the interrupt sampling.
__IOM uint32_t hif_pio_oe0
#define DRV_DIO_ID_GPIO_4
DRV_MMIO_DEVICE_T * ptMMIODevice
#define DRV_DIO_ID_GPIO_7
DRV_STATUS_E DRV_DIO_ChannelIRQMask(DRV_DIO_ID_T ulChannelID)
This function masks a io channels interrupt out.
void DRV_DIO_BOD_Callback(void)
This is the callback of the BOD IRQ.
__IOM uint32_t gpio_app_tc[8]
__IOM uint32_t hif_pio_out0
#define DRV_DIO_ID_GPIO_MAX
#define DRV_ASIC_CTRL_DEVICE
static __INLINE void DRV_DIO_ResetHIF(uint64_t ulChannel)
Helper function.
DRV_STATUS_E DRV_DIO_ChannelInGet(DRV_DIO_ID_T ulChannelID, DRV_DIO_STATE_E *const peState)
This function stores the channel state at the given position.
DRV_STATUS_E DRV_DIO_LineOutEnableSet(DRV_DIO_LINE_E eLine, DRV_DIO_MSK_T ullChannels)
This function enables line output capability on the channels defined.
#define gpio_app_gpio_app_irq_mask_rst_gpio_app3_Msk
void DRV_DIO_GPIO1_Callback(void)
This is the callback of the GPIO 1 IRQ.
void DRV_DIO_GPIO0_Callback(void)
This is the callback of the GPIO 0 IRQ.
DRV_STATUS_E DRV_DIO_ChannelOutSet(DRV_DIO_ID_T ulChannelID)
This function sets the mode of the specified channel to set (high or inverted high).
uint32_t DRV_DIO_ID_T
Type definition for the driver io channel ids.
void(* DRV_CALLBACK_F)(void *pvDriverHandle, void *pvUserHandle)
The definition of callbacks used in the driver.
#define DRV_DIO_ID_HIF_D12
DRV_STATUS_E
DRV Status structures definition.
__IOM uint32_t pio_in_inv
void DRV_DIO_GPIO6_Callback(void)
This is the callback of the GPIO 6 IRQ.
struct mmio_ctrl_Type::@3861::@3895 mmio_pio_out_line_cfg0_b
__IOM uint32_t mmio_pio_out_line_set_cfg0
#define DRV_DIO_ID_GPIO_3
DRV_STATUS_E DRV_DIO_DeInit(void)
This function disables the global DRV_DIO_APP_HANDLE_T object.
void DRV_DIO_GPIO2_Callback(void)
This is the callback of the GPIO 2 IRQ.
struct mmio_ctrl_Type::@3873::@3901 mmio_in_line_status0_b
#define gpio_app_gpio_app_irq_mask_rst_gpio_app7_Msk
static __INLINE void DRV_DIO_ReadModePIO(uint32_t ulChannel)
Helper function.
void GPIO4_IRQHandler(void)
void DRV_NVIC_ClearPendingIRQ(IRQn_Type IRQn)
This method clears the pending state of a given interrupt.
#define asic_ctrl_asic_ctrl_irq_mask_reset_bod_fail_Pos
#define DRV_HIF_IO_DEVICE
void DRV_DIO_GPIO7_Callback(void)
This is the callback of the GPIO 7 IRQ.
__IOM uint32_t hif_pio_oe1
#define gpio_app_gpio_app_irq_mask_rst_gpio_app6_Msk
void ASIC_IRQHandler(void)
#define DRV_BOD_IRQ_COUNT
void GPIO1_IRQHandler(void)
DRV_STATUS_E DRV_DIO_ChannelIRQAttach(DRV_DIO_ID_T ulChannelID, DRV_CALLBACK_F pfnUserClb, void *pvUser)
This function attaches a given function to a DIO channels interrupt.
#define DRV_DIO_ID_HIF_A16
#define DRV_DIO_ID_HIF_MIN
DRV_PIO_DEVICE_T * ptPIODevice
#define hif_io_ctrl_hif_pio_irq_raw_irq_hif_a17_Msk
void GPIO3_IRQHandler(void)
static __INLINE void DRV_DIO_SetMMIO(uint32_t ulChannel)
Helper function.
__IOM uint32_t mmio_pio_out_line_cfg0
DRV_CALLBACK_F s_afnIRQHandler[DRV_DIO_IRQ_COUNT]
void DRV_DIO_GPIO4_Callback(void)
This is the callback of the GPIO 4 IRQ.
DRV_STATUS_E DRV_DIO_Init(void)
This function initializes the global DRV_DIO_APP_HANDLE_T object.
#define gpio_app_gpio_app_cfg_mode_Pos
void GPIO5_IRQHandler(void)
#define DRV_DIO_ID_PIO_MIN
__STATIC_INLINE int DRV_IRQ_Disable(void)
This is a semaphore function for nested disabling the interrupts.
#define gpio_app_gpio_app_cfg_mode_Msk
struct mmio_ctrl_Type::@3869::@3899 mmio_pio_oe_line_set_cfg0_b
#define asic_ctrl_asic_ctrl_irq_raw_bod_fail_Pos
__IOM uint32_t gpio_app_cfg[8]
#define gpio_app_gpio_app_irq_mask_rst_gpio_app2_Msk
void PIO0_IRQHandler(void)
#define hif_io_ctrl_hif_pio_irq_raw_irq_hif_a16_Msk
#define DRV_DIO_IRQ_COUNT
#define hif_io_ctrl_hif_pio_irq_raw_irq_hif_dirq_Msk
void DRV_DIO_GPIO5_Callback(void)
This is the callback of the GPIO 5 IRQ.