changed argument for SENSORS_ACTIVATE/DEACTIVATE to be a pointer to the sensor structure
This commit is contained in:
parent
82241f640e
commit
480f72c95c
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: sensors.h,v 1.4 2010/01/14 13:55:21 nifi Exp $
|
* @(#)$Id: sensors.h,v 1.5 2010/01/14 14:17:08 nifi Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SENSORS_H__
|
#ifndef __SENSORS_H__
|
||||||
@ -41,8 +41,10 @@
|
|||||||
#define SENSORS_ACTIVE 129 /* ACTIVE => 0 -> turn off, 1 -> turn on */
|
#define SENSORS_ACTIVE 129 /* ACTIVE => 0 -> turn off, 1 -> turn on */
|
||||||
#define SENSORS_READY 130 /* read only */
|
#define SENSORS_READY 130 /* read only */
|
||||||
|
|
||||||
#define SENSORS_ACTIVATE(sensor) sensor.configure(SENSORS_ACTIVE, (void*)1)
|
#define SENSORS_ACTIVATE(sensor) \
|
||||||
#define SENSORS_DEACTIVATE(sensor) sensor.configure(SENSORS_ACTIVE, (void*)0)
|
(sensor)->configure(SENSORS_ACTIVE, (void *)1)
|
||||||
|
#define SENSORS_DEACTIVATE(sensor) \
|
||||||
|
(sensor)->configure(SENSORS_ACTIVE, (void *)0)
|
||||||
|
|
||||||
#define SENSORS_SENSOR(name, type, value, configure, status) \
|
#define SENSORS_SENSOR(name, type, value, configure, status) \
|
||||||
const struct sensors_sensor name = { type, value, configure, status }
|
const struct sensors_sensor name = { type, value, configure, status }
|
||||||
|
Loading…
Reference in New Issue
Block a user