default code

This commit is contained in:
2024-01-06 01:45:01 -05:00
parent eb9a0455b3
commit 9429b27ae2
1615 changed files with 250240 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/*
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>
#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 *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();