VSF Documented
Macros | Functions
exti_common.c File Reference
#include "hal/driver/driver.h"

Macros

#define VSF_EXTI_CFG_FUNCTION_RENAME   DISABLED
 

Functions

vsf_err_t vsf_exti_config_channels (vsf_exti_t *exti_ptr, vsf_exti_channel_mask_t channel_mask, vsf_exti_channel_cfg_t *cfg_ptr)
 Configure one or more channels of the exti instance.
 
vsf_err_t vsf_exti_init (vsf_exti_t *exti_ptr)
 Initialize a EXTI instance.
 
void vsf_exti_fini (vsf_exti_t *exti_ptr)
 Finalize a EXTI instance.
 
vsf_exti_status_t vsf_exti_status (vsf_exti_t *exti_ptr)
 Get the status of EXTI instance.
 
vsf_exti_capability_t vsf_exti_capability (vsf_exti_t *exti_ptr)
 Get the capability of exti instance.
 
vsf_err_t vsf_exti_trigger (vsf_exti_t *exti_ptr, vsf_exti_channel_mask_t channel_mask)
 Trigger EXTI channels.
 
vsf_err_t vsf_exti_irq_enable (vsf_exti_t *exti_ptr, vsf_exti_channel_mask_t channel_mask)
 Enable interrupt of one or more channels.
 
vsf_err_t vsf_exti_irq_disable (vsf_exti_t *exti_ptr, vsf_exti_channel_mask_t channel_mask)
 Disable interrupt of one or more channels.
 

Macro Definition Documentation

◆ VSF_EXTI_CFG_FUNCTION_RENAME

#define VSF_EXTI_CFG_FUNCTION_RENAME   DISABLED

Function Documentation

◆ vsf_exti_config_channels()

vsf_err_t vsf_exti_config_channels ( vsf_exti_t exti_ptr,
vsf_exti_channel_mask_t  channel_mask,
vsf_exti_channel_cfg_t cfg_ptr 
)

Configure one or more channels of the exti instance.

Parameters
[in]exti_ptra pointer to structure vsf_exti_t
[in]channel_maskchannel mask, each channel corresponds to one bit, the value of this bit 1 means the configuration will be applied to the corresponding channel
[in]cfg_ptra pointer to structure vsf_exti_channel_cfg_t
Returns
vsf_err_t: VSF_ERR_NONE if EXTI Configuration Successful, or a negative error code

◆ vsf_exti_init()

vsf_err_t vsf_exti_init ( vsf_exti_t exti_ptr)

Initialize a EXTI instance.

Parameters
[in]exti_ptra pointer to structure vsf_exti_t
Returns
vsf_err_t: VSF_ERR_NONE if initialization successful, otherwise returns error code
Note
It is not necessary to call vsf_exti_fini() to deinitialization. vsf_exti_init() should be called before any other EXTI API except vsf_exti_capability().

◆ vsf_exti_fini()

void vsf_exti_fini ( vsf_exti_t exti_ptr)

Finalize a EXTI instance.

Parameters
[in]exti_ptra pointer to structure vsf_exti_t
Returns
none

◆ vsf_exti_status()

vsf_exti_status_t vsf_exti_status ( vsf_exti_t exti_ptr)

Get the status of EXTI instance.

Parameters
[in]exti_ptra pointer to structure vsf_exti_t
Returns
vsf_exti_status_t: all status of current EXTI

◆ vsf_exti_capability()

vsf_exti_capability_t vsf_exti_capability ( vsf_exti_t exti_ptr)

Get the capability of exti instance.

Parameters
[in]exti_ptrpointer to the structure vsf_exti_t, refer to vsf_exti_t
Returns
vsf_exti_capability_t: all capabilities of current EXTI vsf_exti_capability_t

◆ vsf_exti_trigger()

vsf_err_t vsf_exti_trigger ( vsf_exti_t exti_ptr,
vsf_exti_channel_mask_t  channel_mask 
)

Trigger EXTI channels.

Parameters
[in]exti_ptra pointer to structure vsf_exti_t
[in]channel_maskchannel mask, each channel corresponds to one bit, the value of this bit 1 means the configuration will be applied to the corresponding channel
Returns
vsf_err_t: VSF_ERR_NONE if required channels Triggered, or a negative error code

◆ vsf_exti_irq_enable()

vsf_err_t vsf_exti_irq_enable ( vsf_exti_t exti_ptr,
vsf_exti_channel_mask_t  channel_mask 
)

Enable interrupt of one or more channels.

Parameters
[in]exti_ptra pointer to structure vsf_exti_t
[in]channel_maskchannel mask, each channel corresponds to one bit, 1 means the corresponding channel needs to be enabled, 0 means the corresponding channel does not need to be enabled
Returns
vsf_err_t: VSF_ERR_NONE if successful, or a negative error code
Note
For some devices, the interrupt priority may be shared between channels on the exti.
All pending interrupts should be cleared before interrupts are enabled.

◆ vsf_exti_irq_disable()

vsf_err_t vsf_exti_irq_disable ( vsf_exti_t exti_ptr,
vsf_exti_channel_mask_t  channel_mask 
)

Disable interrupt of one or more channels.

Parameters
[in]exti_ptra pointer to structure vsf_exti_t
[in]channel_maskchannel mask, each channel corresponds to one bit, 1 means the corresponding channel needs to be disabled, 0 means the corresponding channel does not need to be disabled
Returns
vsf_err_t: VSF_ERR_NONE if successful, or a negative error code
Note
For some devices, the interrupt settings may be shared between channels on the exti.
Generated from commit: vsfteam/vsf@368bfa6