MiraOS  v1.0 2016-02-20
Functions
mira_gpio.h File Reference

MiraOS GPIO driver. More...

#include <stdint.h>
#include "hcl_typedefs.h"

Go to the source code of this file.

Functions

void mira_gpio_init (HclGpioPorts port, uint8_t pin, HclGpioPinMode mode, HclGpioPullMode pull_mode)
 Initialize a GPIO pin. More...
 
uint8_t mira_gpio_read (HclGpioPorts port, uint8_t pin)
 Read an input pin. More...
 
void mira_gpio_set (HclGpioPorts port, uint8_t pin)
 Set an output pin (logic high output). More...
 
void mira_gpio_clear (HclGpioPorts port, uint8_t pin)
 Clear an output pin (logic low output). More...
 

Detailed Description

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

Function Documentation

void mira_gpio_clear ( HclGpioPorts  port,
uint8_t  pin 
)

Clear an output pin (logic low output).

Parameters
portThe port where the pin is located (Port A, B, C)
pinPin 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
portThe port where the pin is located (Port A, B, C)
pinPin number within the port
modeInput or output
pull_modePull-up/pull-down mode
Returns
void
uint8_t mira_gpio_read ( HclGpioPorts  port,
uint8_t  pin 
)

Read an input pin.

Parameters
portThe port where the pin is located (Port A, B, C)
pinPin 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
portThe port where the pin is located (Port A, B, C)
pinPin number within the port
Returns
void