ESP-Nodes/ESP32-Rainmaker-Multidevice/multi_device/main/app_priv.h
Alexandre B 2d5e4f803b .
2024-01-06 03:00:04 -05:00

33 lines
1.0 KiB
C

/*
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
// Default values
#define DEFAULT_SWITCH_POWER true
#define DEFAULT_LIGHT_POWER true
#define DEFAULT_LIGHT_BRIGHTNESS 25
#define DEFAULT_FAN_POWER false
#define DEFAULT_FAN_SPEED 3
#define DEFAULT_TEMPERATURE 25.0
#define REPORTING_PERIOD 60 /* Seconds */
extern esp_rmaker_device_t *switch_device;
extern esp_rmaker_device_t *switch_1;
extern esp_rmaker_device_t *switch_2;
extern esp_rmaker_device_t *temp_sensor;
extern esp_rmaker_device_t *light__device;
extern esp_rmaker_device_t *fan_device;
extern esp_rmaker_device_t *temp_sensor_device;
void app_driver_init(void);
int app_driver_set_state(bool state);
bool app_driver_get_state(void);
float app_get_current_temperature();