VSF Documented
|
#include "hal/driver/driver.h"
Macros | |
#define | VSF_GPIO_CFG_FUNCTION_RENAME DISABLED |
Functions | |
vsf_err_t | vsf_gpio_port_config_pins (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask, vsf_gpio_cfg_t *cfg_ptr) |
Configure one or more pins of the gpio instance. | |
void | vsf_gpio_set_direction (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask, vsf_gpio_pin_mask_t direction_mask) |
** | |
vsf_gpio_pin_mask_t | vsf_gpio_get_direction (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Get the orientation of one or more pins of the gpio instance. | |
void | vsf_gpio_set_input (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Set the direction of one or more pins of the gpio instance to input. | |
void | vsf_gpio_set_output (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Set the direction of one or more pins of the gpio instance to output. | |
void | vsf_gpio_switch_direction (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Toggle the orientation of one or more pins of a gpio instance. | |
vsf_gpio_pin_mask_t | vsf_gpio_read (vsf_gpio_t *gpio_ptr) |
Read the values of all pins of the gpio instance. | |
void | vsf_gpio_write (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask, vsf_gpio_pin_mask_t value) |
set the value of one or more of the gpio instances | |
void | vsf_gpio_set (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Set the value of one or more pins of the gpio instance to high. | |
void | vsf_gpio_clear (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Set the value of one or more pins of the gpio instance to low. | |
void | vsf_gpio_toggle (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Toggle the value of one or more pins of the gpio instance. | |
void | vsf_gpio_output_and_set (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Set the direction of one or more pins of the gpio instance to output high. | |
void | vsf_gpio_output_and_clear (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Set the direction of one or more pins of the gpio instance to output low. | |
vsf_gpio_capability_t | vsf_gpio_capability (vsf_gpio_t *gpio_ptr) |
Get the capability of gpio instance. | |
vsf_err_t | vsf_gpio_exti_irq_config (vsf_gpio_t *gpio_ptr, vsf_gpio_exti_irq_cfg_t *irq_cfg_ptr) |
Configure external interrupt of the gpio instance. | |
vsf_err_t | vsf_gpio_exti_irq_enable (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Enable interrupt of one or more pins. | |
vsf_err_t | vsf_gpio_exti_irq_disable (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
Disable interrupt of one or more pins. | |
#define VSF_GPIO_CFG_FUNCTION_RENAME DISABLED |
vsf_err_t vsf_gpio_port_config_pins | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask, | ||
vsf_gpio_cfg_t * | cfg | ||
) |
Configure one or more pins of the gpio instance.
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
[in] | pin_mask | pin mask, each pin corresponds to one bit, the value of this bit 1 means configuration is required |
[in] | cfg | a pointer to structure vsf_gpio_cfg_t |
void vsf_gpio_set_direction | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask, | ||
vsf_gpio_pin_mask_t | direction_mask | ||
) |
**
**
Set the orientation of one or more pins of the gpio instance
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
[in] | direction_mask | direction mask, 1 for output, 0 for input |
[in] | pin_mask | pin mask, each pin corresponds to one bit, the value of this bit 1 means configuration is required |
vsf_gpio_pin_mask_t vsf_gpio_get_direction | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Get the orientation of one or more pins of the gpio instance.
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
[in] | pin_mask | pin mask, each pin corresponds to one bit, the value of this bit 1 means configuration is required |
void vsf_gpio_set_input | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Set the direction of one or more pins of the gpio instance to input.
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
[in] | Pin | mask, each pin corresponds to one bit, the value of the bit 1 indicates the need to set to input |
void vsf_gpio_set_output | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Set the direction of one or more pins of the gpio instance to output.
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
[in] | Pin | mask, each pin corresponds to one bit, the value of the bit 1 indicates the need to set to output |
void vsf_gpio_switch_direction | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Toggle the orientation of one or more pins of a gpio instance.
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
[in] | Pin | mask, each pin corresponds to one bit, the value of the bit 1 indicates the need to set to output |
vsf_gpio_pin_mask_t vsf_gpio_read | ( | vsf_gpio_t * | gpio_ptr | ) |
Read the values of all pins of the gpio instance.
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
void vsf_gpio_write | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask, | ||
vsf_gpio_pin_mask_t | value | ||
) |
set the value of one or more of the gpio instances
[in] | gpio_ptr | pointer to the structure vsf_gpio_t, refer to vsf_gpio_t |
[in] | value | value of the pin, each pin corresponds to a bit, 1 means high, 0 means high |
[in] | pin_mask | pin mask, each pin corresponds to one bit, 1 means the bit needs to be written, 0 means the bit does not need to be updated |
void vsf_gpio_set | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Set the value of one or more pins of the gpio instance to high.
[in] | gpio_ptr | pointer to the structure vsf_gpio_t, refer to vsf_gpio_t |
[in] | pin_mask | pin mask, each pin corresponds to one bit, 1 means the bit needs to be written, 0 means the bit does not need to be updated |
void vsf_gpio_clear | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Set the value of one or more pins of the gpio instance to low.
[in] | gpio_ptr | pointer to the structure vsf_gpio_t, refer to vsf_gpio_t |
[in] | pin_mask | pin mask, each pin corresponds to one bit, 1 means the bit needs to be written, 0 means the bit does not need to be updated |
void vsf_gpio_toggle | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Toggle the value of one or more pins of the gpio instance.
[in] | gpio_ptr | pointer to the structure vsf_gpio_t, refer to vsf_gpio_t |
[in] | pin_mask | pin mask, each pin corresponds to one bit, 1 means the bit needs to be written, 0 means the bit does not need to be updated |
void vsf_gpio_output_and_set | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Set the direction of one or more pins of the gpio instance to output high.
[in] | gpio_ptr | pointer to the structure vsf_gpio_t, refer to vsf_gpio_t |
[in] | pin_mask | pin mask, each pin corresponds to one bit, 1 means the bit needs to be written, 0 means the bit does not need to be updated |
void vsf_gpio_output_and_clear | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Set the direction of one or more pins of the gpio instance to output low.
[in] | gpio_ptr | pointer to the structure vsf_gpio_t, refer to vsf_gpio_t |
[in] | pin_mask | pin mask, each pin corresponds to one bit, 1 means the bit needs to be written, 0 means the bit does not need to be updated |
vsf_gpio_capability_t vsf_gpio_capability | ( | vsf_gpio_t * | gpio_ptr | ) |
Get the capability of gpio instance.
[in] | gpio_ptr | pointer to the structure vsf_gpio_t, refer to vsf_gpio_t |
vsf_err_t vsf_gpio_exti_irq_config | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_exti_irq_cfg_t * | cfg_ptr | ||
) |
Configure external interrupt of the gpio instance.
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
[in] | cfg | a pointer to structure vsf_gpio_exti_irq_cfg_t |
vsf_err_t vsf_gpio_exti_irq_enable | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Enable interrupt of one or more pins.
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
[in] | pin_mask | pin mask, each pin corresponds to one bit, 1 means the bit |
[in] | prio | priority of the interrupt or vsf_arch_prio_invalid for disable |
vsf_err_t vsf_gpio_exti_irq_disable | ( | vsf_gpio_t * | gpio_ptr, |
vsf_gpio_pin_mask_t | pin_mask | ||
) |
Disable interrupt of one or more pins.
[in] | gpio_ptr | a pointer to structure vsf_gpio_t |
[in] | pin_mask | pin mask, each pin corresponds to one bit, 1 means the bit |