STIMA
3
|
#include <sensors_config.h>
Go to the source code of this file.
Macros | |
#define | MODULE_VERSION (3) |
Module version. | |
#define | MODULE_TYPE (STIMA_MODULE_TYPE_OPC) |
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_OPC_DEFAULT_ADDRESS) |
Default i2c address. | |
#define | CONFIGURATION_RESET_PIN (8) |
Input pin for reset configuration at startup. | |
#define | OPC_POWER_PIN (9) |
Output pin for power on and power off opc sensor. | |
#define | OPC_SPI_POWER_PIN (6) |
#define | OPC_CHIP_SELECT (10) |
Output pin for spi chip select opc sensor. | |
#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 | 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_OPC_POWER_DOWN (false) |
Enable or disable power down for opc sensor. | |
#define | WDT_TIMER (WDTO_8S) |
Watchdog timer for periodically check microprocessor block states. More... | |
#define | SENSORS_SAMPLE_TIME_MS (10000) |
Milliseconds for sampling sensors: 100 - 60000 [ms] must be integer multiple of TIMER1_INTERRUPT_TIME_MS !!! | |
#define | SENSORS_SAMPLE_COUNT_MIN ((uint8_t)(OBSERVATIONS_MINUTES * 60 / ((uint8_t)(SENSORS_SAMPLE_TIME_MS / 1000)))) |
Sample count minimum in OBSERVATIONS_MINUTES minutes. | |
#define | SENSORS_SAMPLE_COUNT_MAX (SENSORS_SAMPLE_COUNT_MIN) |
Sample count maximum in OBSERVATIONS_MINUTES minutes. | |
#define | SENSORS_SAMPLE_COUNT_TOLERANCE (4) |
Maximum invalid sample count for generate a valid observations. | |
#define | USE_SENSORS_COUNT (USE_SENSOR_OA2 + USE_SENSOR_OB2 + USE_SENSOR_OC2 + USE_SENSOR_OD2 + USE_SENSOR_OA3 + USE_SENSOR_OB3 + USE_SENSOR_OC3 + USE_SENSOR_OD3 + USE_SENSOR_OE3) |
Sensors count. | |
#define | TIMER1_INTERRUPT_TIME_MS (2000) |
Value in milliseconds for generating timer1 interrupt: 100 - 8000 [ms]. | |
#define | TIMER1_OVERFLOW_TIME_MS (4194) |
Timer1 timer overflow with 1024 prescaler at 8 or 16 MHz. More... | |
#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 | TIMER1_VALUE_MAX_MS (60000) |
Maximum timer1 counter value for timed tasks. | |
#define | OPC_RETRY_COUNT_MAX (2) |
Maximum number of retry for opc reading. | |
#define TIMER1_OVERFLOW_TIME_MS (4194) |
Timer1 timer overflow with 1024 prescaler at 8 or 16 MHz.
Timer1 timer overflow with 1024 prescaler at 8 MHz.
Timer1 timer overflow with 1024 prescaler at 16 MHz.
#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