MiraOS GPIO driver.
More...
#include <stdint.h>
#include "hcl_typedefs.h"
Go to the source code of this file.
MiraOS GPIO driver.
- Author
- LumenRadio AB
- Date
- 17 Jan 2016 The MiraOS library provides functions for controlling the Mira radio module, sending/receiving messages, controlling peripherals, etc.
- See also
- http://docs.lumenrad.io/mira
void mira_gpio_clear |
( |
HclGpioPorts |
port, |
|
|
uint8_t |
pin |
|
) |
| |
Clear an output pin (logic low output).
- Parameters
-
port | The port where the pin is located (Port A, B, C) |
pin | Pin number within the port |
- Returns
- void
void mira_gpio_init |
( |
HclGpioPorts |
port, |
|
|
uint8_t |
pin, |
|
|
HclGpioPinMode |
mode, |
|
|
HclGpioPullMode |
pull_mode |
|
) |
| |
Initialize a GPIO pin.
- Parameters
-
port | The port where the pin is located (Port A, B, C) |
pin | Pin number within the port |
mode | Input or output |
pull_mode | Pull-up/pull-down mode |
- Returns
- void
uint8_t mira_gpio_read |
( |
HclGpioPorts |
port, |
|
|
uint8_t |
pin |
|
) |
| |
Read an input pin.
- Parameters
-
port | The port where the pin is located (Port A, B, C) |
pin | Pin number within the port |
- Returns
- logic level at input pin
void mira_gpio_set |
( |
HclGpioPorts |
port, |
|
|
uint8_t |
pin |
|
) |
| |
Set an output pin (logic high output).
- Parameters
-
port | The port where the pin is located (Port A, B, C) |
pin | Pin number within the port |
- Returns
- void