The friendly Operating System for the Internet of Things

Device driver interface for the IO1 Xplained extension. More...

Detailed Description

Internal addresses, constants for the IO1 Xplained extension.

Files

file  io1_xplained.h
 Device driver interface for the IO1 Xplained extention.
 
file  io1_xplained_internals.h
 Internal addresses, constants for the IO1 Xplained extension.
 

Data Structures

struct  io1_xplained_t
 Device descriptor for the IO1 Xplained extension. More...
 
struct  io1_xplained_params_t
 Device initialization parameters. More...
 

Functions

void io1_xplained_auto_init (void)
 auto-initialize all configured IO1 Xplained extensions
 
int io1_xplained_init (io1_xplained_t *dev, uint8_t addr)
 Initialize the given IO1 Xplained extension. More...
 
int io1_xplained_read_temperature (io1_xplained_t *dev, float *temperature)
 Read temperature value from the given IO1 Xplained extension, returned in °C. More...
 
int io1_xplained_set_led (void)
 Set the on-board led of the IO1 Xplained extension. More...
 
int io1_xplained_clear_led (void)
 Clear the on-board led of the IO1 Xplained extension. More...
 
int io1_xplained_toggle_led (void)
 Toggle the on-board led of the IO1 Xplained extension. More...
 
const saul_driver_t io1_xplained_temperature_saul_driver
 export SAUL endpoints
 

IO1 Xplained I2C addresses

#define TEMPERATURE_BASE_ADDR   (0x48)
 
#define TEMPERATURE_DEFAULT_ADDR   (0x07)
 

IO1 Xplained LED pin

#define IO1_LED_PIN   GPIO_PIN(0,18)
 

IO1 Xplained gpio pins

#define IO1_GPIO1_PIN   GPIO_PIN(0,13)
 
#define IO1_GPIO2_PIN   GPIO_PIN(0,28)
 

Function Documentation

int io1_xplained_clear_led ( void  )
Returns
0 on success
-1 if extension GPIO is not enabled in board config
int io1_xplained_init ( io1_xplained_t dev,
uint8_t  addr 
)
Parameters
[out]devInitialized device descriptor of IO1 Xplained extension
[in]addrCustom address of the extension board
Returns
0 on success
-1 if given I2C is not enabled in board config
int io1_xplained_read_temperature ( io1_xplained_t dev,
float *  temperature 
)
Parameters
[in]devDevice descriptor of IO1 Xplained to read from
[out]temperatureTemperature in °C
Returns
0 on success
-1 if device's I2C is not enabled in board config
int io1_xplained_set_led ( void  )
Returns
0 on success
-1 if extension GPIO is not enabled in board config
int io1_xplained_toggle_led ( void  )
Returns
0 on success
-1 if extension GPIO is not enabled in board config