General Purpose Input/Output (GPIO) interface for digital signal control.
More...
|
| MYRIOTA_HARDWARE_API int | GPIOSetModeInput (uint8_t PinNum, GPIOPull Pull) |
| | Set a GPIO to input mode and the internal pull up/down.
|
| |
| MYRIOTA_HARDWARE_API int | GPIOSetModeOutput (uint8_t PinNum) |
| | Set a GPIO to output mode.
|
| |
| MYRIOTA_HARDWARE_API int | GPIOSetHigh (uint8_t PinNum) |
| | Set a GPIO output high.
|
| |
| MYRIOTA_HARDWARE_API int | GPIOSetLow (uint8_t PinNum) |
| | Set a GPIO output low.
|
| |
| MYRIOTA_HARDWARE_API int | GPIOGet (uint8_t PinNum) |
| | Get input level of a GPIO.
|
| |
| MYRIOTA_HARDWARE_API int | GPIOSetWakeupLevel (uint8_t PinNum, GPIOLevel Level) |
| | Set level polarity of a GPIO pin with wakeup capability for next wakeup.
|
| |
| MYRIOTA_HARDWARE_API int | GPIODisableWakeup (uint8_t PinNum) |
| | Disable wakeup capability of a GPIO pin.
|
| |
General Purpose Input/Output (GPIO) interface for digital signal control.
◆ GPIOLevel
GPIO level.
| Enumerator |
|---|
| GPIO_LOW | Low logic level.
|
| GPIO_HIGH | High logic level.
|
◆ GPIOPull
GPIO internal pull up/down.
| Enumerator |
|---|
| GPIO_NO_PULL | No module internal pull up or pull down.
|
| GPIO_PULL_UP | Module internal pull up.
|
| GPIO_PULL_DOWN | Module internal pull down.
|
◆ GPIOSetModeInput()
| MYRIOTA_HARDWARE_API int GPIOSetModeInput |
( |
uint8_t |
PinNum, |
|
|
GPIOPull |
Pull |
|
) |
| |
Set a GPIO to input mode and the internal pull up/down.
- Parameters
-
| PinNum | The GPIO pin number from ModulePinDef. |
| Pull | The internal pull up/down configuration from GPIOPull. |
- Returns
- 0 if succeeded, -1 if failed.
◆ GPIOSetModeOutput()
| MYRIOTA_HARDWARE_API int GPIOSetModeOutput |
( |
uint8_t |
PinNum | ) |
|
Set a GPIO to output mode.
- Parameters
-
- Returns
- 0 if succeeded, -1 if failed.
◆ GPIOSetHigh()
| MYRIOTA_HARDWARE_API int GPIOSetHigh |
( |
uint8_t |
PinNum | ) |
|
Set a GPIO output high.
- Parameters
-
- Returns
- 0 if succeeded, -1 if failed.
◆ GPIOSetLow()
| MYRIOTA_HARDWARE_API int GPIOSetLow |
( |
uint8_t |
PinNum | ) |
|
Set a GPIO output low.
- Parameters
-
- Returns
- 0 if succeeded, -1 if failed.
◆ GPIOGet()
| MYRIOTA_HARDWARE_API int GPIOGet |
( |
uint8_t |
PinNum | ) |
|
Get input level of a GPIO.
- Parameters
-
- Returns
- GPIOLevel if succeeded, -1 if failed.
◆ GPIOSetWakeupLevel()
| MYRIOTA_HARDWARE_API int GPIOSetWakeupLevel |
( |
uint8_t |
PinNum, |
|
|
GPIOLevel |
Level |
|
) |
| |
Set level polarity of a GPIO pin with wakeup capability for next wakeup.
- Parameters
-
| PinNum | The GPIO pin number from ModulePinDef with wakeup capability. |
| Level | The wakeup level from GPIOLevel. |
- Returns
- 0 if succeeded, -1 if failed.
◆ GPIODisableWakeup()
| MYRIOTA_HARDWARE_API int GPIODisableWakeup |
( |
uint8_t |
PinNum | ) |
|
Disable wakeup capability of a GPIO pin.
- Parameters
-
| PinNum | The GPIO pin number from ModulePinDef with wakeup capability. |
- Returns
- 0 if succeeded, -1 if failed (e.g., pin does not support wakeup).