Microchip® Advanced Software Framework

button-sensor.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "contiki.h"
#include "button-sensor.h"
#include "sys/timer.h"
#include "asf.h"
#include "extint.h"

Macros

#define DEBOUNCE_TIME   (CLOCK_SECOND/8)
 

Functions

static int button_sensor_configure (int type, int value)
 
void button_sensor_init (void)
 
static int button_sensor_status (int type)
 
static int button_sensor_value (int type)
 
static void extint_detection_callback (void)
 
 SENSORS_SENSOR (button_sensor,"Button sensor", button_sensor_value, button_sensor_configure, button_sensor_status)
 

Variables

static struct timer debouncetimer
 
static int enabled = 0
 

#define DEBOUNCE_TIME   (CLOCK_SECOND/8)

static int button_sensor_status ( int  type)
static

References enabled.

static int button_sensor_value ( int  type)
static
static void extint_detection_callback ( void  )
static
SENSORS_SENSOR ( button_sensor  ,
"Button sensor"  ,
button_sensor_value  ,
button_sensor_configure  ,
button_sensor_status   
)

struct timer debouncetimer
static
int enabled = 0
static