Loading...
Searching...
No Matches
saul_reg.h File Reference

SAUL registry interface definition. More...

Detailed Description

SAUL registry interface definition.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file saul_reg.h.

#include <stdint.h>
#include "saul.h"
#include "phydat.h"
+ Include dependency graph for saul_reg.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  saul_reg
 SAUL registry entry. More...
 
struct  saul_reg_info_t
 Additional data to collect for each entry. More...
 

Typedefs

typedef struct saul_reg saul_reg_t
 SAUL registry entry.
 

Functions

int saul_reg_add (saul_reg_t *dev)
 Register a device with the SAUL registry.
 
saul_reg_tsaul_reg_find_nth (int pos)
 Find a device by its position in the registry.
 
saul_reg_tsaul_reg_find_type (uint8_t type)
 Find the first device by its type in the registry.
 
saul_reg_tsaul_reg_find_name (const char *name)
 Find the first device by its name in the registry.
 
saul_reg_tsaul_reg_find_type_and_name (uint8_t type, const char *name)
 Find the first device by its type and name in the registry.
 
int saul_reg_read (saul_reg_t *dev, phydat_t *res)
 Read data from the given device.
 
int saul_reg_write (saul_reg_t *dev, const phydat_t *data)
 Write data to the given device.
 

Variables

saul_reg_tsaul_reg
 Export the SAUL registry as global variable.