Microchip® Advanced Software Framework

sensors.h File Reference
#include "contiki.h"

Data Structures

struct  sensors_sensor
 

Macros

#define SENSORS(...)
 
#define SENSORS_ACTIVATE(sensor)   (sensor).configure(SENSORS_ACTIVE, 1)
 
#define SENSORS_ACTIVE   129 /* ACTIVE => 0 -> turn off, 1 -> turn on */
 
#define SENSORS_DEACTIVATE(sensor)   (sensor).configure(SENSORS_ACTIVE, 0)
 
#define SENSORS_HW_INIT   128 /* internal - used only for initialization */
 
#define SENSORS_NUM   (sizeof(sensors) / sizeof(struct sensors_sensor *))
 
#define SENSORS_READY   130 /* read only */
 
#define SENSORS_SENSOR(name, type, value, configure, status)   const struct sensors_sensor name = { type, value, configure, status }
 

Functions

 PROCESS_NAME (sensors_process)
 
void sensors_changed (const struct sensors_sensor *s)
 
struct sensors_sensorsensors_find (const char *type)
 
struct sensors_sensorsensors_first (void)
 
struct sensors_sensorsensors_next (const struct sensors_sensor *s)
 

Variables

process_event_t sensors_event
 

#define SENSORS (   ...)
Value:
const struct sensors_sensor *sensors[] = {__VA_ARGS__, NULL}; \
unsigned char sensors_flags[SENSORS_NUM]
#define NULL
Definition: def.h:47
#define SENSORS_NUM
Definition: sensors.h:49
Definition: sensors.h:55
unsigned char sensors_flags[]
const struct sensors_sensor * sensors[]
#define SENSORS_ACTIVATE (   sensor)    (sensor).configure(SENSORS_ACTIVE, 1)
#define SENSORS_ACTIVE   129 /* ACTIVE => 0 -> turn off, 1 -> turn on */
#define SENSORS_DEACTIVATE (   sensor)    (sensor).configure(SENSORS_ACTIVE, 0)
#define SENSORS_HW_INIT   128 /* internal - used only for initialization */

Referenced by PROCESS_THREAD().

#define SENSORS_NUM   (sizeof(sensors) / sizeof(struct sensors_sensor *))
#define SENSORS_READY   130 /* read only */
#define SENSORS_SENSOR (   name,
  type,
  value,
  configure,
  status 
)    const struct sensors_sensor name = { type, value, configure, status }

PROCESS_NAME ( sensors_process  )
void sensors_changed ( const struct sensors_sensor s)
struct sensors_sensor* sensors_find ( const char *  type)

References i, len, NULL, num_sensors, and sensors_sensor::type.

Referenced by PROCESS_THREAD().

struct sensors_sensor* sensors_first ( void  )
struct sensors_sensor* sensors_next ( const struct sensors_sensor s)

References get_sensor_index().

process_event_t sensors_event

Referenced by PROCESS_THREAD().