Functions | |
void | Cy_GPIO_SetAmuxSplit (cy_en_amux_split_t switchCtrl, cy_en_gpio_amuxconnect_t amuxConnect, cy_en_gpio_amuxselect_t amuxBus) |
Configure a specific AMux bus splitter switch cell into a specific configuration. More... | |
cy_en_gpio_amuxconnect_t | Cy_GPIO_GetAmuxSplit (cy_en_amux_split_t switchCtrl, cy_en_gpio_amuxselect_t amuxBus) |
Returns the configuration of a specific AMux bus splitter switch cell. More... | |
__STATIC_INLINE uint32_t | Cy_GPIO_Read (GPIO_PRT_Type *base, uint32_t pinNum) |
Reads the current logic level on the input buffer of the pin. More... | |
__STATIC_INLINE void | Cy_GPIO_Write (GPIO_PRT_Type *base, uint32_t pinNum, uint32_t value) |
Write a logic 0 or logic 1 state to the output driver. More... | |
__STATIC_INLINE uint32_t | Cy_GPIO_ReadOut (GPIO_PRT_Type *base, uint32_t pinNum) |
Reads the current logic level on the pin output driver. More... | |
__STATIC_INLINE void | Cy_GPIO_Set (GPIO_PRT_Type *base, uint32_t pinNum) |
Set a pin output to logic state high. More... | |
__STATIC_INLINE void | Cy_GPIO_Clr (GPIO_PRT_Type *base, uint32_t pinNum) |
Set a pin output to logic state Low. More... | |
__STATIC_INLINE void | Cy_GPIO_Inv (GPIO_PRT_Type *base, uint32_t pinNum) |
Set a pin output logic state to the inverse of the current output logic state. More... | |
__STATIC_INLINE void | Cy_GPIO_SetDrivemode (GPIO_PRT_Type *base, uint32_t pinNum, uint32_t value) |
Configures the pin output buffer drive mode and input buffer enable. More... | |
__STATIC_INLINE uint32_t | Cy_GPIO_GetDrivemode (GPIO_PRT_Type *base, uint32_t pinNum) |
Returns the pin output buffer drive mode and input buffer enable state. More... | |
__STATIC_INLINE void | Cy_GPIO_SetVtrip (GPIO_PRT_Type *base, uint32_t pinNum, uint32_t value) |
Configures the GPIO pin input buffer voltage threshold mode. More... | |
__STATIC_INLINE uint32_t | Cy_GPIO_GetVtrip (GPIO_PRT_Type *base, uint32_t pinNum) |
Returns the pin input buffer voltage threshold mode. More... | |
__STATIC_INLINE void | Cy_GPIO_SetSlewRate (GPIO_PRT_Type *base, uint32_t pinNum, uint32_t value) |
Configures the pin output buffer slew rate. More... | |
__STATIC_INLINE uint32_t | Cy_GPIO_GetSlewRate (GPIO_PRT_Type *base, uint32_t pinNum) |
Returns the pin output buffer slew rate. More... | |
__STATIC_INLINE void | Cy_GPIO_SetDriveSel (GPIO_PRT_Type *base, uint32_t pinNum, uint32_t value) |
Configures the pin output buffer drive strength. More... | |
__STATIC_INLINE uint32_t | Cy_GPIO_GetDriveSel (GPIO_PRT_Type *base, uint32_t pinNum) |
Returns the pin output buffer drive strength. More... | |
void Cy_GPIO_SetAmuxSplit | ( | cy_en_amux_split_t | switchCtrl, |
cy_en_gpio_amuxconnect_t | amuxConnect, | ||
cy_en_gpio_amuxselect_t | amuxBus | ||
) |
Configure a specific AMux bus splitter switch cell into a specific configuration.
switchCtrl | Selects specific AMux bus splitter cell between two segments. The cy_en_amux_split_t enumeration can be found in the GPIO header file for the device package. |
amuxConnect | Selects configuration of the three switches within the splitter cell |
amuxBus | Selects which AMux bus within the splitter is being configured |
cy_en_gpio_amuxconnect_t Cy_GPIO_GetAmuxSplit | ( | cy_en_amux_split_t | switchCtrl, |
cy_en_gpio_amuxselect_t | amuxBus | ||
) |
Returns the configuration of a specific AMux bus splitter switch cell.
switchCtrl | Selects specific AMux bus splitter cell between two segments. The cy_en_amux_split_t enumeration can be found in the GPIO header file for the device package. |
amuxBus | Selects which AMux bus within the splitter is being configured |
__STATIC_INLINE uint32_t Cy_GPIO_Read | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum | ||
) |
Reads the current logic level on the input buffer of the pin.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register. Bit position 8 is the routed pin through the port glitch filter. |
__STATIC_INLINE void Cy_GPIO_Write | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum, | ||
uint32_t | value | ||
) |
Write a logic 0 or logic 1 state to the output driver.
This function should be used only for software driven pins. It does not have any effect on peripheral driven pins.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
value | Logic level to drive out on the pin |
__STATIC_INLINE uint32_t Cy_GPIO_ReadOut | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum | ||
) |
Reads the current logic level on the pin output driver.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
__STATIC_INLINE void Cy_GPIO_Set | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum | ||
) |
Set a pin output to logic state high.
This function should be used only for software driven pins. It does not have any effect on peripheral driven pins.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
__STATIC_INLINE void Cy_GPIO_Clr | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum | ||
) |
Set a pin output to logic state Low.
This function should be used only for software driven pins. It does not have any effect on peripheral driven pins.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
__STATIC_INLINE void Cy_GPIO_Inv | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum | ||
) |
Set a pin output logic state to the inverse of the current output logic state.
This function should be used only for software driven pins. It does not have any effect on peripheral driven pins.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
__STATIC_INLINE void Cy_GPIO_SetDrivemode | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum, | ||
uint32_t | value | ||
) |
Configures the pin output buffer drive mode and input buffer enable.
The output buffer drive mode and input buffer enable are combined into a single parameter. The drive mode controls the behavior of the pin in general. Enabling the input buffer allows the digital pin state to be read but also contributes to extra current consumption.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
value | Pin drive mode. Options are detailed in Pin drive mode macros |
__STATIC_INLINE uint32_t Cy_GPIO_GetDrivemode | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum | ||
) |
Returns the pin output buffer drive mode and input buffer enable state.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
__STATIC_INLINE void Cy_GPIO_SetVtrip | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum, | ||
uint32_t | value | ||
) |
Configures the GPIO pin input buffer voltage threshold mode.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
value | Pin voltage threshold mode. Options are detailed in Voltage trip mode macros |
__STATIC_INLINE uint32_t Cy_GPIO_GetVtrip | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum | ||
) |
Returns the pin input buffer voltage threshold mode.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
__STATIC_INLINE void Cy_GPIO_SetSlewRate | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum, | ||
uint32_t | value | ||
) |
Configures the pin output buffer slew rate.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
value | Pin slew rate. Options are detailed in Slew Rate Mode macros |
__STATIC_INLINE uint32_t Cy_GPIO_GetSlewRate | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum | ||
) |
Returns the pin output buffer slew rate.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
__STATIC_INLINE void Cy_GPIO_SetDriveSel | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum, | ||
uint32_t | value | ||
) |
Configures the pin output buffer drive strength.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |
value | Pin drive strength. Options are detailed in Pin drive strength macros |
__STATIC_INLINE uint32_t Cy_GPIO_GetDriveSel | ( | GPIO_PRT_Type * | base, |
uint32_t | pinNum | ||
) |
Returns the pin output buffer drive strength.
base | Pointer to the pin's port register base address |
pinNum | Position of the pin bit-field within the port register |