MiraOS I2C driver.
More...
#include <stdint.h>
Go to the source code of this file.
MiraOS I2C 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
Supported pull-up options for the I2C bus.
Enumerator |
---|
MIRA_I2C_NO_PULLUPS |
Do not enable internal pull-ups (external pull-up must be present)
|
MIRA_I2C_USE_PULLUPS |
Enable internal pull-ups
|
Supported I2C bus speeds.
Enumerator |
---|
MIRA_I2C_NORMAL_BUS_SPEED |
100KHz I2C
|
MIRA_I2C_FAST_BUS_SPEED |
400KHz I2C
|
uint8_t mira_i2c_burst_receive |
( |
uint8_t |
address, |
|
|
uint8_t * |
data_pointer, |
|
|
uint8_t |
length |
|
) |
| |
Receive multiple bytes.
- Parameters
-
address | 7 bit I2C chip address (without R/W bit) |
data_pointer | pointer to where to write received byte |
length | number of bytes |
- Returns
- void
uint8_t mira_i2c_burst_send |
( |
uint8_t |
address, |
|
|
uint8_t * |
data_pointer, |
|
|
uint8_t |
length |
|
) |
| |
Send multiple bytes.
- Parameters
-
address | 7 bit I2C chip address (without R/W bit) |
data_pointer | pointer to data to send |
length | number of bytes |
- Returns
- void
Initialize the I2C driver.
- Parameters
-
speed | Bus speed |
pullups | Use internal pull-ups |
- Returns
- void
uint8_t mira_i2c_single_receive |
( |
uint8_t |
address, |
|
|
uint8_t * |
data_pointer |
|
) |
| |
Receive a single byte.
- Parameters
-
address | 7 bit I2C chip address (without R/W bit) |
data_pointer | pointer to where to write received byte |
- Returns
- void
uint8_t mira_i2c_single_send |
( |
uint8_t |
address, |
|
|
uint8_t |
data |
|
) |
| |
Send a single byte.
- Parameters
-
address | 7 bit I2C chip address (without R/W bit) |
data | data byte to send |
- Returns
- void