STIMA  3
Macros
i2c-leaf-config.h File Reference
#include <sensors_config.h>
Include dependency graph for i2c-leaf-config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MODULE_MAIN_VERSION   (3)
 Module major version.
 
#define MODULE_MINOR_VERSION   (18)
 Module major version.
 
#define MODULE_CONFIGURATION_VERSION   (1)
 Module version of compatibile configuration. If you change it, you have to reconfigure.
 
#define MODULE_TYPE   (STIMA_MODULE_TYPE_LEAF)
 Type of module. It is defined in registers.h.
 
#define CONFIGURATION_DEFAULT_IS_ONESHOT   (false)
 Oneshot mode for default.
 
#define CONFIGURATION_DEFAULT_IS_CONTINUOUS   (true)
 Continuous mode for default.
 
#define CONFIGURATION_DEFAULT_I2C_ADDRESS   (I2C_LEAF_DEFAULT_ADDRESS)
 Default i2c address.
 
#define CONFIGURATION_DEFAULT_LEAF_CALIBRATION_THRESHOLD   (512)
 Default threshold for ADC wet/dry (0-1023).
 
#define CONFIGURATION_RESET_PIN   (8)
 Input pin for reset configuration at startup.
 
#define LEAF_POWER_PIN   (2)
 Output pin for power on and power off leaf sensor.
 
#define LEAF_ANALOG_PIN   (A0)
 Input pin for reading leaf sensor value.
 
#define SDCARD_CHIP_SELECT_PIN   7
 Chip select for SDcard SPI.
 
#define SPI_SPEED   SD_SCK_MHZ(4)
 Clock speed for SPI and SDcard.
 
#define I2C_MAX_TIME   (600)
 Max i2c time in seconds before i2c restart.
 
#define USE_POWER_DOWN   (true)
 Enable or disable power down.
 
#define DEBOUNCING_POWER_DOWN_TIME_MS   (10)
 Debounce power down ms.
 
#define USE_TIMER_1   (true)
 Enable or disable timer1.
 
#define USE_LEAF_POWER_DOWN   (true)
 Enable or disable power down for leaf sensor.
 
#define WDT_TIMER   (WDTO_8S)
 Watchdog timer for periodically check microprocessor block states. More...
 
#define SENSORS_SAMPLE_TIME_MS   (4000)
 Milliseconds for sampling sensors: 1000 - 60000 [ms] must be integer multiple of TIMER1_INTERRUPT_TIME_MS !!!
 
#define TIMER1_INTERRUPT_TIME_MS   (2000)
 Value in milliseconds for generating timer1 interrupt: 100 - 8000 [ms].
 
#define TIMER1_TCNT1_VALUE   ((uint16_t)(0xFFFF - (float)(1.0 * 0xFFFF * TIMER1_INTERRUPT_TIME_MS / TIMER1_OVERFLOW_TIME_MS)))
 Timer1 timer overflow with 1024 prescaler at 8 MHz.
 
#define TIMER_COUNTER_VALUE_MAX_MS   (SENSORS_SAMPLE_TIME_MS)
 Maximum timer1 counter value for timed tasks.
 
#define LEAF_VALUES_READ_DELAY_MS   (2)
 Reading delay from measure to get one data.
 
#define LEAF_READ_COUNT   (10)
 Maximum number of leaf reading to get one data.
 
#define TRANSACTION_TIMEOUT_MS   (5000)
 Timeout for command transaction.
 

Macro Definition Documentation

◆ WDT_TIMER

#define WDT_TIMER   (WDTO_8S)

Watchdog timer for periodically check microprocessor block states.

Possible value for WDT_TIMER are: WDTO_15MS, WDTO_30MS, WDTO_60MS, WDTO_120MS, WDTO_250MS, WDTO_500MS, WDTO_1S, WDTO_2S, WDTO_4S, WDTO_8S