|
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. | |
| vsf_err_t | vsf_gpio_get_pin_configuration (vsf_gpio_t *gpio_ptr, uint16_t pin_index, vsf_gpio_cfg_t *cfg_ptr) |
| Get configuration of a specific pin 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 GPIO port pin direction. | |
| void | vsf_gpio_set_input (vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask) |
| set specified pins to input mode | |
| 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. | |
| vsf_gpio_pin_mask_t | vsf_gpio_read_output_register (vsf_gpio_t *gpio_ptr) |
| Read the output register 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_get_configuration (vsf_gpio_t *gpio_ptr, vsf_gpio_exti_irq_cfg_t *irq_cfg_ptr) |
| Get the current external interrupt configuration 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_ptr | ||
| ) |
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_ptr | a pointer to structure vsf_gpio_cfg_t |
| vsf_err_t vsf_gpio_get_pin_configuration | ( | vsf_gpio_t * | gpio_ptr, |
| uint16_t | pin_index, | ||
| vsf_gpio_cfg_t * | cfg_ptr | ||
| ) |
Get configuration of a specific pin of the gpio instance.
| [in] | gpio_ptr | a pointer to structure vsf_gpio_t |
| [in] | pin_index | pin index (0-based), specifies which pin's configuration to retrieve |
| [out] | cfg_ptr | a pointer to structure vsf_gpio_cfg_t to store the configuration |
| 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 GPIO port pin direction
| [in] | gpio_ptr | a pointer to structure vsf_gpio_t |
| [in] | pin_mask | a pin mask, each pin corresponds to a bit, value 1 of the bit to change, 0 means unchanged |
| [in] | direction_mask | a direction mask, each pin corresponds to a bit, value 1 for output, 0 for input |
| vsf_gpio_pin_mask_t vsf_gpio_get_direction | ( | vsf_gpio_t * | gpio_ptr, |
| vsf_gpio_pin_mask_t | pin_mask | ||
| ) |
Get GPIO port pin direction.
| [in] | gpio_ptr | a pointer to structure vsf_gpio_t |
| [in] | pin_mask | a pin mask, each pin corresponds to a bit. direction of all pins in pin_mask will be returned. |
| void vsf_gpio_set_input | ( | vsf_gpio_t * | gpio_ptr, |
| vsf_gpio_pin_mask_t | pin_mask | ||
| ) |
set specified pins to input mode
| [in] | gpio_ptr | a pointer to structure vsf_gpio_t |
| [in] | pin_mask | a pin mask, each pin corresponds to a bit, value 1 to set as 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 | 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 | 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 |
| vsf_gpio_pin_mask_t vsf_gpio_read_output_register | ( | vsf_gpio_t * | gpio_ptr | ) |
Read the output register 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 low |
| [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_ptr | a pointer to structure vsf_gpio_exti_irq_cfg_t |
| vsf_err_t vsf_gpio_exti_irq_get_configuration | ( | vsf_gpio_t * | gpio_ptr, |
| vsf_gpio_exti_irq_cfg_t * | cfg_ptr | ||
| ) |
Get the current external interrupt configuration of the gpio instance.
| [in] | gpio_ptr | a pointer to structure vsf_gpio_t |
| [out] | cfg_ptr | a pointer to structure vsf_gpio_exti_irq_cfg_t to store the current configuration |
| 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 needs to be enabled, 0 means the bit does not need to be enabled |
| 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 needs to be disabled, 0 means the bit does not need to be disabled |