Contiki-NG

Weather meter header file. More...

#include "lib/sensors.h"
#include "dev/zoul-sensors.h"

Go to the source code of this file.

Macros

Weather meter sensor return and operation values
#define WEATHER_METER_RAIN_GAUGE   0x01
 
#define WEATHER_METER_WIND_VANE   0x02
 
#define WEATHER_METER_WIND_VANE_AVG_X   0x03
 
#define WEATHER_METER_ANEMOMETER   0x04
 
#define WEATHER_METER_ANEMOMETER_AVG   0x05
 
#define WEATHER_METER_ANEMOMETER_AVG_X   0x06
 
#define WEATHER_METER_ANEMOMETER_MAX   0x07
 
#define WEATHER_METER_AVG_PERIOD   120
 
#define WEATHER_METER_ACTIVE   SENSORS_ACTIVE
 
#define WEATHER_METER_ANEMOMETER_INT_OVER   HW_INT_OVER_THRS
 
#define WEATHER_METER_ANEMOMETER_INT_DIS   HW_INT_DISABLE
 
#define WEATHER_METER_RAIN_GAUGE_INT_OVER   (HW_INT_OVER_THRS << 1)
 
#define WEATHER_METER_RAIN_GAUGE_INT_DIS   (HW_INT_DISABLE << 1)
 
#define WEATHER_METER_SUCCESS   0
 
#define WEATHER_METER_ERROR   (-1)
 
#define WEATHER_METER_ANEMOMETER_SPEED_1S   (1200)
 
#define WEATHER_METER_AUX_RAIN_MM   2794
 
#define WEATHER_METER_RAIN_RETURN_TICKS   1
 
Weather meter's anemometer default pin, port and interrupt vector
#define ANEMOMETER_SENSOR_PIN   1
 
#define ANEMOMETER_SENSOR_PORT   GPIO_D_NUM
 
#define ANEMOMETER_SENSOR_VECTOR   GPIO_D_IRQn
 
Weather meter's rain gauge default pin, port and interrupt vector
#define RAIN_GAUGE_SENSOR_PIN   2
 
#define RAIN_GAUGE_SENSOR_PORT   GPIO_D_NUM
 
#define RAIN_GAUGE_SENSOR_VECTOR   GPIO_D_IRQn
 
Weather meter's wind vane default ADCx pin (see board.h)
#define WIND_VANE_ADC   ZOUL_SENSORS_ADC3
 

Anemometer and rain gauge sensor interrupt callback macro

#define WEATHER_METER_REGISTER_ANEMOMETER_INT(ptr)   anemometer_int_callback = ptr;
 
#define WEATHER_METER_REGISTER_RAIN_GAUGE_INT(ptr)   rain_gauge_int_callback = ptr;
 
void(* anemometer_int_callback )(uint16_t value)
 
void(* rain_gauge_int_callback )(uint16_t value)
 

Detailed Description

Weather meter header file.

Author
Antonio Lignan alina.nosp@m.n@zo.nosp@m.lerti.nosp@m.a.co.nosp@m.m

Definition in file weather-meter.h.