Cleanup headers

This commit is contained in:
fvanroie 2021-05-06 04:19:41 +02:00
parent 0d8b3c2a66
commit 21bbdb9c32
8 changed files with 50 additions and 50 deletions

View File

@ -240,6 +240,14 @@ static WiFiSpiClass WiFi;
#include "sys/svc/hasp_slave.h"
#endif
#ifndef HASP_ATTRIBUTE_FAST_MEM
#define HASP_ATTRIBUTE_FAST_MEM
#endif
#ifndef IRAM_ATTR
#define IRAM_ATTR
#endif
#ifndef FPSTR
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper*>(pstr_pointer))
#endif

View File

@ -8,10 +8,7 @@
#include "Arduino.h"
#endif
#include "lvgl.h"
#include "hasp_conf.h"
#include "hasp_conf.h"
#include "hasplib.h"
#if HASP_USE_DEBUG > 0
#include "../hasp_debug.h"

View File

@ -4,8 +4,7 @@
#ifndef HASP_DISPATCH_H
#define HASP_DISPATCH_H
#include "ArduinoJson.h"
#include "lvgl.h"
#include "hasplib.h"
struct dispatch_conf_t
{

View File

@ -4,8 +4,7 @@
#ifndef HASP_OBJECT_H
#define HASP_OBJECT_H
#include <ArduinoJson.h>
#include "lvgl.h"
#include "hasplib.h"
const char FP_PAGE[] PROGMEM = "page";
const char FP_ID[] PROGMEM = "id";
@ -15,50 +14,50 @@ const char FP_PARENTID[] PROGMEM = "parentid";
const char FP_GROUPID[] PROGMEM = "groupid";
enum lv_hasp_obj_type_t {
/* Containers */
LV_HASP_SCREEN = 1,
LV_HASP_CONTAINER = 2,
LV_HASP_WINDOW = 3, // placeholder
LV_HASP_MSGBOX = 4, // placeholder
LV_HASP_TILEVIEW = 5, // placeholder
LV_HASP_TABVIEW = 6, // placeholder
LV_HASP_TAB = 7, // placeholder
LV_HASP_PAGE = 8, // Obsolete in v8
/* Controls */
LV_HASP_OBJECT = 91, // 10
LV_HASP_BUTTON = 10, // 12
LV_HASP_OBJECT = 11,
LV_HASP_BUTTON = 12,
LV_HASP_BTNMATRIX = 13,
LV_HASP_IMGBTN = 14, // placeholder
LV_HASP_CHECKBOX = 11, // 15
LV_HASP_SWITCH = 40, // 16
LV_HASP_SLIDER = 30, // 17
LV_HASP_CHECKBOX = 15,
LV_HASP_SWITCH = 16,
LV_HASP_SLIDER = 17,
LV_HASP_TEXTAREA = 18, // placeholder
LV_HASP_SPINBOX = 19, // placeholder
LV_HASP_CPICKER = 20,
/* Selectors */
LV_HASP_DROPDOWN = 50,
LV_HASP_ROLLER = 51,
LV_HASP_LIST = 52, // placeholder
LV_HASP_TABLE = 53,
LV_HASP_CALENDER = 54,
/* Containers */
LV_HASP_SCREEN = 1,
LV_HASP_CONTAINER = 70,
LV_HASP_WINDOW = 71, // placeholder
LV_HASP_MSGBOX = 72, // placeholder
LV_HASP_TILEVIEW = 73, // placeholder
LV_HASP_TABVIEW = 74, // placeholder
LV_HASP_TAB = 75, // placeholder
LV_HASP_PAGE = 79, // Obsolete in v8
/* Visualizers */
LV_HASP_LABEL = 12, // 30
LV_HASP_GAUGE = 31,
LV_HASP_BAR = 32,
LV_HASP_LMETER = 33,
LV_HASP_LED = 41, // 34
LV_HASP_ARC = 22, // 35
LV_HASP_SPINNER = 21, // 36
LV_HASP_CHART = 37,
LV_HASP_LABEL = 21,
LV_HASP_GAUGE = 22,
LV_HASP_BAR = 23,
LV_HASP_LMETER = 24,
LV_HASP_LED = 25,
LV_HASP_ARC = 26,
LV_HASP_SPINNER = 27,
LV_HASP_CHART = 28,
/* Selectors */
LV_HASP_DROPDOWN = 29,
LV_HASP_ROLLER = 30,
LV_HASP_LIST = 31, // placeholder
LV_HASP_TABLE = 32,
LV_HASP_CALENDER = 33,
/* Graphics */
LV_HASP_LINE = 60,
LV_HASP_IMAGE = 61, // placeholder
LV_HASP_CANVAS = 62, // placeholder
LV_HASP_MASK = 63, // placeholder
LV_HASP_LINE = 36,
LV_HASP_IMAGE = 37, // placeholder
LV_HASP_CANVAS = 38, // placeholder
LV_HASP_MASK = 39, // placeholder
};
void hasp_new_object(const JsonObject& config, uint8_t& saved_page_id);

View File

@ -4,8 +4,7 @@
#ifndef HASP_PARSER_H
#define HASP_PARSER_H
#include "lvgl.h"
#include "hasp_conf.h"
#include "hasplib.h"
class Parser {

View File

@ -5,9 +5,7 @@
#define HASP_MQTT_H
#include <stdint.h>
#include "ArduinoJson.h"
#include "hasp_conf.h"
#include "hasplib.h"
// #if defined(WINDOWS) || defined(POSIX)
// #define __FlashStringHelper char

View File

@ -4,6 +4,7 @@
#include "lv_conf.h" // For timing defines
#include "hasplib.h"
#include "hasp_gpio.h"
#include "hasp_config.h"
@ -537,8 +538,7 @@ void gpio_set_normalized_group_values(uint8_t group, int32_t val, int32_t min, i
// Set all pins first, minimizes delays
for(uint8_t k = 0; k < HASP_NUM_GPIO_CONFIG; k++) {
hasp_gpio_config_t* gpio = &gpioConfig[k];
if(gpio->group == group && // group members that are outputs
gpioConfigInUse(k))
if(gpio->group == group && gpioConfigInUse(k)) // group members that are outputs
gpio_set_normalized_value(gpio, val, min, max);
}

View File

@ -4,7 +4,7 @@
#ifndef HASP_GPIO_H
#define HASP_GPIO_H
#include "ArduinoJson.h"
#include "hasplib.h"
#ifdef __cplusplus
extern "C" {