Atmel IO1 Xplained Extension board

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

Detailed Description

Device driver interface for the Atmel IO1 Xplained extension.

This board contains several sensors and actuators:

This board can be used with the following Atmel evaluation boards:

See the datasheet for more information

Files

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

Data Structures

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

Enumerations

enum  {
  IO1_XPLAINED_OK = 0, IO1_XPLAINED_NOTEMP, IO1_XPLAINED_NOLED, IO1_XPLAINED_NOGPIO1,
  IO1_XPLAINED_NOGPIO2, IO1_XPLAINED_READ_OK, IO1_XPLAINED_READ_ERR
}
 IO1 Xplained driver return codes. More...
 

Functions

int io1_xplained_init (io1_xplained_t *dev, const io1_xplained_params_t *params)
 Initialize the given IO1 Xplained extension. More...
 
int io1_xplained_read_temperature (const io1_xplained_t *dev, float *temperature)
 Read temperature value from the given IO1 Xplained extension, returned in °C. More...
 
void io1_xplained_set_led (void)
 Set the on-board led of the IO1 Xplained extension.
 
void io1_xplained_clear_led (void)
 Clear the on-board led of the IO1 Xplained extension.
 
void io1_xplained_toggle_led (void)
 Toggle the on-board led of the IO1 Xplained extension.
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

IO1 Xplained driver return codes.

Enumerator
IO1_XPLAINED_OK 

Initialization successful.

IO1_XPLAINED_NOTEMP 

Error during temperature sensor initialization.

IO1_XPLAINED_NOLED 

Error during extension LED initialization.

IO1_XPLAINED_NOGPIO1 

Error during extension GPIO1 initialization.

IO1_XPLAINED_NOGPIO2 

Error during extension GPIO2 initialization.

IO1_XPLAINED_READ_OK 

Temperature read successful.

IO1_XPLAINED_READ_ERR 

Error when reading temperature sensor.

Definition at line 51 of file io1_xplained.h.

Function Documentation

◆ io1_xplained_init()

int io1_xplained_init ( io1_xplained_t dev,
const io1_xplained_params_t params 
)

Initialize the given IO1 Xplained extension.

Parameters
[out]devInitialized device descriptor of IO1 Xplained extension
[in]paramsDevice initialization parameters
Returns
IO1_XPLAINED_OK on success
-IO1_XPLAINED_NOTEMP if temperature sensor initialization failed
-IO1_XPLAINED_NOLED if LED initialization failed
-IO1_XPLAINED_NOGPIO1 if GPIO1 initialization failed
-IO1_XPLAINED_NOGPIO2 if GPIO2 initialization failed

◆ io1_xplained_read_temperature()

int io1_xplained_read_temperature ( const io1_xplained_t dev,
float *  temperature 
)

Read temperature value from the given IO1 Xplained extension, returned in °C.

Parameters
[in]devDevice descriptor of IO1 Xplained to read from
[out]temperatureTemperature in °C
Returns
IO1_XPLAINED_READ_OK on success
-IO1_XPLAINED_READ_ERR if temperature sensor read failed