Contiki 3.x
Files | Functions
SensorTag 2.0 Reed Relay

The reed relay acts like a button without a button. More...

Files

file  reed-relay.c
 Driver for the Sensortag-CC26XX Reed Relay.
 
file  reed-relay.h
 Header file for the Sensortag-CC26XX Reed Relay.
 

Functions

static void reed_interrupt_handler (uint8_t ioid)
 Handler for Sensortag-CC26XX reed interrupts.
 
static int configure (int type, int value)
 Configuration function for the button sensor for all buttons. More...
 
static int status (int type)
 Status function for the reed. More...
 

Detailed Description

The reed relay acts like a button without a button.

To trigger the reed, approach a magnet to the sensortag and a sensors_changed event will be generated, in a fashion similar to as if a button had been pressed

Function Documentation

static int configure ( int  type,
int  value 
)
static

Configuration function for the button sensor for all buttons.

Parameters
typeSENSORS_HW_INIT: Initialise. SENSORS_ACTIVE: Enables/Disables depending on 'value'
value0: disable, non-zero: enable
Returns
Always returns 1

Definition at line 89 of file reed-relay.c.

References gpio_interrupt_register_handler(), and reed_interrupt_handler().

static int status ( int  type)
static

Status function for the reed.

Parameters
typeSENSORS_ACTIVE or SENSORS_READY
Returns
1 Interrupt enabled, 0: Disabled

Definition at line 125 of file reed-relay.c.