Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

GPIO Exported Functions

GPIO Exported Functions
[GPIO Driver]

Functions

void GPIO_SetMode (GPIO_T *port, uint32_t u32PinMask, uint32_t u32Mode)
 Set GPIO operation mode.
void GPIO_EnableInt (GPIO_T *port, uint32_t u32Pin, uint32_t u32IntAttribs)
 Enable GPIO interrupt.
void GPIO_DisableInt (GPIO_T *port, uint32_t u32Pin)
 Disable GPIO interrupt.
void GPIO_SetSlewCtl (GPIO_T *port, uint32_t u32PinMask, uint32_t u32Mode)
 Set GPIO slew rate control.
void GPIO_SetPullCtl (GPIO_T *port, uint32_t u32PinMask, uint32_t u32Mode)
 Set GPIO Pull-up and Pull-down control.

Function Documentation

void GPIO_DisableInt ( GPIO_T *  port,
uint32_t  u32Pin 
)

Disable GPIO interrupt.

Parameters:
[in]portGPIO port. It could be It could be PA, PB, PC, PD, PE, PF, PG or PH.
[in]u32PinThe pin of specified GPIO port. It could be 0 ~ 15 for PA, PB, PC, PD, PF and PH GPIO port. It could be 0 ~ 13 for PE GPIO port. It could be 0 ~ 11 for PG GPIO port.
Returns:
None

This function is used to disable specified GPIO pin interrupt.

Definition at line 106 of file m480_gpio.c.

void GPIO_EnableInt ( GPIO_T *  port,
uint32_t  u32Pin,
uint32_t  u32IntAttribs 
)

Enable GPIO interrupt.

Parameters:
[in]portGPIO port. It could be It could be PA, PB, PC, PD, PE, PF, PG or PH.
[in]u32PinThe pin of specified GPIO port. It could be 0 ~ 15 for PA, PB, PC, PD, PF and PH GPIO port. It could be 0 ~ 13 for PE GPIO port. It could be 0 ~ 11 for PG GPIO port.
[in]u32IntAttribsThe interrupt attribute of specified GPIO pin. It could be
GPIO_INT_RISING, GPIO_INT_FALLING, GPIO_INT_BOTH_EDGE, GPIO_INT_HIGH, GPIO_INT_LOW.
Returns:
None

This function is used to enable specified GPIO pin interrupt.

Definition at line 86 of file m480_gpio.c.

void GPIO_SetMode ( GPIO_T *  port,
uint32_t  u32PinMask,
uint32_t  u32Mode 
)

Set GPIO operation mode.

Parameters:
[in]portGPIO port. It could be It could be PA, PB, PC, PD, PE, PF, PG or PH.
[in]u32PinMaskThe single or multiple pins of specified GPIO port. It could be BIT0 ~ BIT15 for PA, PB, PC, PD, PF and PH GPIO port. It could be BIT0 ~ BIT13 for PE GPIO port. It could be BIT0 ~ BIT11 for PG GPIO port.
[in]u32ModeOperation mode. It could be
GPIO_MODE_INPUT, GPIO_MODE_OUTPUT, GPIO_MODE_OPEN_DRAIN, GPIO_MODE_QUASI.
Returns:
None

This function is used to set specified GPIO operation mode.

Definition at line 60 of file m480_gpio.c.

void GPIO_SetPullCtl ( GPIO_T *  port,
uint32_t  u32PinMask,
uint32_t  u32Mode 
)

Set GPIO Pull-up and Pull-down control.

Parameters:
[in]portGPIO port. It could be PA, PB, ... or GPH
[in]u32PinMaskThe pin of specified GPIO port. It could be 0 ~ 15.
[in]u32ModeThe pin mode of specified GPIO pin. It could be GPIO_PUSEL_DISABLE GPIO_PUSEL_PULL_UP GPIO_PUSEL_PULL_DOWN
Returns:
None

Set the pin mode of specified GPIO pin.

Definition at line 150 of file m480_gpio.c.

void GPIO_SetSlewCtl ( GPIO_T *  port,
uint32_t  u32PinMask,
uint32_t  u32Mode 
)

Set GPIO slew rate control.

Parameters:
[in]portGPIO port. It could be PA, PB, ... or GPH
[in]u32PinMaskThe single or multiple pins of specified GPIO port.
[in]u32ModeSlew rate mode. GPIO_SLEWCTL_NORMAL (maximum 40 MHz at 2.7V) GPIO_SLEWCTL_HIGH (maximum 80 MHz at 2.7V) GPIO_SLEWCTL_FAST (maximum 100 MHz at 2.7V)
Returns:
None

This function is used to set specified GPIO operation mode.

Definition at line 125 of file m480_gpio.c.