1721be5e66
- This was done at the very beginning when i thought to develop this part of the program in a different way. It is unnecessary with how I actually ended up to structure the program. - WDT should manage TWI only, as per current developement
50 lines
867 B
C
50 lines
867 B
C
#ifndef MOISTURE_H
|
|
#define MOISTURE_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include "config.h"
|
|
|
|
static const int8_t sensorPins[] = {
|
|
#ifdef MOISTURE_SENSOR_A0
|
|
MOISTURE_SENSOR_A0,
|
|
#endif
|
|
|
|
#ifdef MOISTURE_SENSOR_A1
|
|
MOISTURE_SENSOR_A1,
|
|
#endif
|
|
|
|
#ifdef MOISTURE_SENSOR_A2
|
|
MOISTURE_SENSOR_A2,
|
|
#endif
|
|
|
|
#ifdef MOISTURE_SENSOR_A3
|
|
MOISTURE_SENSOR_A3,
|
|
#endif
|
|
|
|
#ifdef MOISTURE_SENSOR_A4
|
|
MOISTURE_SENSOR_A4,
|
|
#endif
|
|
|
|
#ifdef MOISTURE_SENSOR_A5
|
|
MOISTURE_SENSOR_A5,
|
|
#endif
|
|
|
|
#ifdef MOISTURE_SENSOR_A6
|
|
MOISTURE_SENSOR_A6,
|
|
#endif
|
|
|
|
#ifdef MOISTURE_SENSOR_A7
|
|
MOISTURE_SENSOR_A7,
|
|
#endif
|
|
};
|
|
|
|
#define SENSORS_NUM (sizeof(sensorPins) / sizeof(sensorPins[0]))
|
|
|
|
extern volatile bool readSensors;
|
|
|
|
void sensorsInit(void);
|
|
uint16_t moistureRead(void);
|
|
|
|
#endif
|