mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2025-10-29 19:43:22 +00:00
BK7231T/U/ESP32/LN882H SPI LED (#1749)
* BK7231U/T_ALT SPI LED * esp32 spi led dma * ln882h led spi dma * simplify --------- Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
This commit is contained in:
parent
0fb70227df
commit
94812a2587
@ -1349,7 +1349,7 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port,
|
||||
LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL);
|
||||
remaining_length = (u16_t)len;
|
||||
}
|
||||
if (client_info->client_user != NULL && client_info->client_user[0] != NULL) {
|
||||
if (client_info->client_user != NULL && client_info->client_user[0] != 0) {
|
||||
flags |= MQTT_CONNECT_FLAG_USERNAME;
|
||||
len = strlen(client_info->client_user);
|
||||
LWIP_ERROR("mqtt_client_connect: client_info->client_user length overflow", len <= 0xFFFF, return ERR_VAL);
|
||||
@ -1359,7 +1359,7 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port,
|
||||
LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL);
|
||||
remaining_length = (u16_t)len;
|
||||
}
|
||||
if (client_info->client_pass != NULL && client_info->client_pass[0] != NULL) {
|
||||
if (client_info->client_pass != NULL && client_info->client_pass[0] != 0) {
|
||||
flags |= MQTT_CONNECT_FLAG_PASSWORD;
|
||||
len = strlen(client_info->client_pass);
|
||||
LWIP_ERROR("mqtt_client_connect: client_info->client_pass length overflow", len <= 0xFFFF, return ERR_VAL);
|
||||
|
||||
@ -2,10 +2,15 @@ cmake_minimum_required(VERSION 3.16.0)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
add_compile_definitions(PLATFORM_ESPIDF=1)
|
||||
add_compile_definitions(LWIP_NOASSERT=1)
|
||||
|
||||
if (DEFINED $ENV{APP_VERSION})
|
||||
add_definitions( -DUSER_SW_VER="$ENV{APP_VERSION}" )
|
||||
endif()
|
||||
|
||||
add_definitions( -DOBK_VARIANT=$ENV{OBK_VARIANT} )
|
||||
include_directories("$ENV{IDF_PATH}/../../libraries/berry/src")
|
||||
include_directories("$ENV{IDF_PATH}/../../include")
|
||||
|
||||
set(PROJECT_VER "$ENV{APP_VERSION}")
|
||||
project(OpenBeken)
|
||||
idf_build_set_property(COMPILE_OPTIONS "-Wno-error=format-truncation" APPEND)
|
||||
|
||||
@ -19,4 +19,4 @@ set(PROJ_ALL_SRC
|
||||
../../../libraries/mqtt_patched.c
|
||||
)
|
||||
idf_component_register(SRCS ${PROJ_ALL_SRC} WHOLE_ARCHIVE
|
||||
PRIV_REQUIRES mqtt lwip esp_wifi nvs_flash esp_driver_tsens esp_driver_gpio esp_pm esp_partition app_update esp_adc esp_driver_uart esp_driver_ledc spi_flash)
|
||||
PRIV_REQUIRES mqtt lwip esp_wifi nvs_flash esp_driver_tsens esp_driver_gpio esp_pm esp_partition app_update esp_adc esp_driver_uart esp_driver_ledc spi_flash esp_driver_spi)
|
||||
|
||||
@ -4,7 +4,6 @@ CONFIG_LWIP_IPV6_AUTOCONFIG=n
|
||||
CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA=n
|
||||
CONFIG_ESP_WIFI_ENABLE_WPA3_SAE=n
|
||||
CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT=n
|
||||
CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_NEWLIB_NANO_FORMAT=y
|
||||
CONFIG_PARTITION_TABLE_SINGLE_APP=n
|
||||
|
||||
@ -17,7 +17,6 @@ CONFIG_LWIP_MAX_ACTIVE_TCP=5
|
||||
CONFIG_LWIP_MAX_LISTENING_TCP=5
|
||||
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=n
|
||||
CONFIG_LWIP_TCP_SYNMAXRTX=12
|
||||
CONFIG_LWIP_TCP_MSL=40000
|
||||
CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT=16000
|
||||
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=4096
|
||||
CONFIG_LWIP_TCP_WND_DEFAULT=2440
|
||||
|
||||
@ -29,6 +29,8 @@ set(PROJ_ALL_SRC
|
||||
startup/startup_${CHIP_SERIAL}_gcc.c
|
||||
${MODULE_SRC}
|
||||
${COMP_LWIP_DIR}/apps/mqtt/mqtt.c
|
||||
${MCU_LN882X_DIR}/driver_${CHIP_SERIAL}/hal/hal_dma.c
|
||||
${MCU_LN882X_DIR}/driver_${CHIP_SERIAL}/hal/hal_spi.c
|
||||
)
|
||||
|
||||
set(COMP_DHCPD_SUPPORT ON PARENT_SCOPE)
|
||||
|
||||
@ -116,6 +116,8 @@ set(OBKM_SRC
|
||||
${OBK_SRCS}driver/drv_sm2235.c
|
||||
${OBK_SRCS}driver/drv_soft_i2c.c
|
||||
${OBK_SRCS}driver/drv_soft_spi.c
|
||||
${OBK_SRCS}driver/drv_sm15155e.c
|
||||
${OBK_SRCS}driver/drv_sm16703P.c
|
||||
${OBK_SRCS}driver/drv_spi.c
|
||||
${OBK_SRCS}driver/drv_spiLED.c
|
||||
${OBK_SRCS}driver/drv_spi_flash.c
|
||||
@ -142,7 +144,5 @@ set(OBKM_SRC
|
||||
${OBK_SRCS}i2c/drv_i2c_tc74.c
|
||||
|
||||
# ${OBK_SRCS}driver/drv_bmp280.c
|
||||
# ${OBK_SRCS}driver/drv_sm15155e.c
|
||||
# ${OBK_SRCS}driver/drv_sm16703P.c
|
||||
# ${OBK_SRCS}driver/drv_test_charts.c
|
||||
)
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 8aa7b6d1937c919aebd7a522b4f11da703525dba
|
||||
Subproject commit f2d67c2ec44bceece555bed7597f8c9f7a8e3fdb
|
||||
@ -11,6 +11,7 @@
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "../httpserver/new_http.h"
|
||||
#include "drv_local.h"
|
||||
|
||||
#if ENABLE_DRIVER_SM16703P
|
||||
#include "drv_spiLED.h"
|
||||
|
||||
@ -69,7 +69,10 @@ void SM16703P_setPixel(int pixel, int r, int g, int b, int c, int w);
|
||||
void SM16703P_setPixelWithBrig(int pixel, int r, int g, int b, int c, int w);
|
||||
void SM16703P_setAllPixels(int r, int g, int b, int c, int w);
|
||||
void SM16703P_scaleAllPixels(int scale);
|
||||
void SM16703P_setMultiplePixel(uint32_t pixel, uint8_t* data, bool push);
|
||||
void SM16703P_Show();
|
||||
void SM15155E_Init();
|
||||
void SM15155E_Write();
|
||||
extern uint32_t pixel_count;
|
||||
|
||||
void TM1637_Init();
|
||||
@ -194,6 +197,7 @@ void DRV_InitFlashMemoryTestFunctions();
|
||||
void PixelAnim_Init();
|
||||
void PixelAnim_SetAnimQuickTick();
|
||||
void PixelAnim_SetAnim(int j);
|
||||
void PixelAnim_CreatePanel(http_request_t* request);
|
||||
|
||||
void Drawers_Init();
|
||||
void Drawers_QuickTick();
|
||||
|
||||
@ -11,9 +11,6 @@ LED_Map 0 1 3 2 4
|
||||
|
||||
*/
|
||||
|
||||
#if PLATFORM_BK7231N || PLATFORM_BK7238 || PLATFORM_BK7252N || WINDOWS
|
||||
|
||||
|
||||
#include "../new_cfg.h"
|
||||
#include "../new_common.h"
|
||||
#include "../new_pins.h"
|
||||
@ -24,18 +21,16 @@ LED_Map 0 1 3 2 4
|
||||
#include "../logging/logging.h"
|
||||
#include "../mqtt/new_mqtt.h"
|
||||
|
||||
#if ENABLE_DRIVER_SM15155E
|
||||
|
||||
#include "drv_spiLED.h"
|
||||
#include "drv_local.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void SM15155E_Write(float *rgbcw) {
|
||||
byte packet[16];
|
||||
|
||||
int i;
|
||||
unsigned short *cur_col_16 = (unsigned short)&packet[0];
|
||||
unsigned short *cur_col_16 = (unsigned short*)&packet[0];
|
||||
|
||||
memset(packet, 0, sizeof(packet));
|
||||
|
||||
@ -63,7 +58,9 @@ void SM15155E_Init() {
|
||||
//cmddetail:"examples":""}
|
||||
CMD_RegisterCommand("LED_Map", CMD_LEDDriver_Map, NULL);
|
||||
|
||||
SPILED_Init();
|
||||
uint32_t pin = PIN_FindPinIndexForRole(IOR_SM16703P_DIN, 0);
|
||||
|
||||
SPILED_Init(pin);
|
||||
|
||||
// FF00 0000 0000 0000 0000 73 9C E7 1F 00
|
||||
SPILED_InitDMA(15);
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
#if PLATFORM_BK7231N || PLATFORM_BK7238 || PLATFORM_BK7252N || WINDOWS
|
||||
|
||||
|
||||
#include "../new_cfg.h"
|
||||
#include "../new_common.h"
|
||||
#include "../new_pins.h"
|
||||
@ -11,6 +8,8 @@
|
||||
#include "../logging/logging.h"
|
||||
#include "../mqtt/new_mqtt.h"
|
||||
|
||||
#if ENABLE_DRIVER_SM16703P
|
||||
|
||||
#include "drv_local.h"
|
||||
#include "drv_spiLED.h"
|
||||
|
||||
@ -65,27 +64,29 @@ void SM16703P_setPixel(int pixel, int r, int g, int b, int c, int w) {
|
||||
int i;
|
||||
for(i = 0; i < pixel_size; i++)
|
||||
{
|
||||
int pcolor;
|
||||
switch (color_channel_order[i])
|
||||
{
|
||||
case COLOR_CHANNEL_RED:
|
||||
translate_byte(r, spiLED.buf + (spiLED.ofs + i * 4 + (pixel * pixel_size * 4)));
|
||||
pcolor = r;
|
||||
break;
|
||||
case COLOR_CHANNEL_GREEN:
|
||||
translate_byte(g, spiLED.buf + (spiLED.ofs + i * 4 + (pixel * pixel_size * 4)));
|
||||
pcolor = g;
|
||||
break;
|
||||
case COLOR_CHANNEL_BLUE:
|
||||
translate_byte(b, spiLED.buf + (spiLED.ofs + i * 4 + (pixel * pixel_size * 4)));
|
||||
pcolor = b;
|
||||
break;
|
||||
case COLOR_CHANNEL_COLD_WHITE:
|
||||
translate_byte(c, spiLED.buf + (spiLED.ofs + i * 4 + (pixel * pixel_size * 4)));
|
||||
pcolor = c;
|
||||
break;
|
||||
case COLOR_CHANNEL_WARM_WHITE:
|
||||
translate_byte(w, spiLED.buf + (spiLED.ofs + i * 4 + (pixel * pixel_size * 4)));
|
||||
pcolor = w;
|
||||
break;
|
||||
default:
|
||||
ADDLOG_ERROR(LOG_FEATURE_CMD, "Unknown color channel %d at index %d", color_channel_order[i], i);
|
||||
return;
|
||||
}
|
||||
translate_byte(pcolor, spiLED.buf + (spiLED.ofs + i * 4 + (pixel * pixel_size * 4)));
|
||||
}
|
||||
}
|
||||
void SM16703P_setMultiplePixel(uint32_t pixel, uint8_t *data, bool push) {
|
||||
@ -319,7 +320,9 @@ static commandResult_t SM16703P_StartTX(const void *context, const char *cmd, co
|
||||
// startDriver SM16703P
|
||||
// backlog startDriver SM16703P; SM16703P_Test
|
||||
void SM16703P_Init() {
|
||||
SPILED_Init();
|
||||
|
||||
int pin = PIN_FindPinIndexForRole(IOR_SM16703P_DIN, -1);
|
||||
SPILED_Init(pin);
|
||||
|
||||
//cmddetail:{"name":"SM16703P_Init","args":"[NumberOfLEDs][ColorOrder]",
|
||||
//cmddetail:"descr":"This will setup LED driver for a strip with given number of LEDs. Please note that it also works for WS2812B and similiar LEDs. You can optionally set the color order with can be any combination of R, G, B, C and W (e.g. RGBW or GRBWC, default is RGB). See [tutorial](https://www.elektroda.com/rtvforum/topic4036716.html).",
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
#if (PLATFORM_BK7231N || WINDOWS) || PLATFORM_BK7238 || PLATFORM_BK7252N
|
||||
|
||||
|
||||
#include "../new_cfg.h"
|
||||
#include "../new_common.h"
|
||||
#include "../new_pins.h"
|
||||
@ -11,10 +8,12 @@
|
||||
#include "../logging/logging.h"
|
||||
#include "../mqtt/new_mqtt.h"
|
||||
|
||||
#if ENABLE_DRIVER_SM16703P || ENABLE_DRIVER_SM15155E
|
||||
|
||||
#include "drv_spidma.h"
|
||||
#include "drv_spiLED.h"
|
||||
|
||||
#if WINDOWS
|
||||
#if WINDOWS && !LINUX
|
||||
|
||||
void SPIDMA_Init(struct spi_message *msg) {
|
||||
|
||||
@ -24,6 +23,9 @@ void SPIDMA_StartTX(struct spi_message *msg) {
|
||||
}
|
||||
void SPIDMA_StopTX(void) {
|
||||
|
||||
}
|
||||
void SPIDMA_Deinit(void) {
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -87,8 +89,11 @@ void SPILED_InitDMA(int numBytes) {
|
||||
|
||||
// Prepare buffer
|
||||
uint32_t buffer_size = spiLED.ofs + (numBytes * 4) + spiLED.padding; //Add `spiLED.ofs` bytes for "Reset"
|
||||
|
||||
#if PLATFORM_ESPIDF
|
||||
spiLED.buf = heap_caps_malloc(sizeof(byte) * (buffer_size), MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA);
|
||||
#else
|
||||
spiLED.buf = (byte *)os_malloc(sizeof(byte) * (buffer_size)); //18LEDs x RGB x 4Bytes
|
||||
#endif
|
||||
|
||||
// Fill `spiLED.ofs` slice of the buffer with zero
|
||||
for (i = 0; i < spiLED.ofs; i++) {
|
||||
@ -148,6 +153,13 @@ void SPILED_SetRawBytes(int start_offset, byte *bytes, int numBytes, int push) {
|
||||
SPIDMA_StartTX(spiLED.msg);
|
||||
}
|
||||
}
|
||||
|
||||
#if !PLATFORM_BK7231N && !PLATFORM_BEKEN_NEW
|
||||
|
||||
int spidma_led_pin = -1;
|
||||
|
||||
#endif
|
||||
|
||||
void SPILED_Shutdown() {
|
||||
spiLED.ready = 0;
|
||||
if (spiLED.buf) {
|
||||
@ -158,11 +170,12 @@ void SPILED_Shutdown() {
|
||||
free(spiLED.msg);
|
||||
spiLED.msg = 0;
|
||||
}
|
||||
SPIDMA_Deinit();
|
||||
}
|
||||
|
||||
void SPILED_Init() {
|
||||
void SPILED_Init(int pin) {
|
||||
#if PLATFORM_BK7231N || PLATFORM_BEKEN_NEW
|
||||
uint32_t val;
|
||||
#if PLATFORM_BK7231N || PLATFORM_BK7238 || PLATFORM_BK7252N
|
||||
val = GFUNC_MODE_SPI_USE_GPIO_14;
|
||||
sddev_control(GPIO_DEV_NAME, CMD_GPIO_ENABLE_SECOND, &val);
|
||||
|
||||
@ -176,8 +189,7 @@ void SPILED_Init() {
|
||||
param = PWD_SPI_CLK_BIT;
|
||||
sddev_control(ICU_DEV_NAME, CMD_CLK_PWR_UP, ¶m);
|
||||
#else
|
||||
|
||||
|
||||
spidma_led_pin = pin;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
#include "drv_spidma.h"
|
||||
|
||||
typedef struct spiLED_s {
|
||||
byte *buf;
|
||||
@ -23,5 +23,5 @@ void SPILED_InitDMA(int numBytes);
|
||||
|
||||
void SPILED_SetRawHexString(int start_offset, const char *s, int push);
|
||||
void SPILED_SetRawBytes(int start_offset, byte *bytes, int numBytes, int push);
|
||||
void SPILED_Init();
|
||||
void SPILED_Init(int pin);
|
||||
void SPILED_Shutdown();
|
||||
@ -1,4 +1,4 @@
|
||||
#if PLATFORM_BK7231N || PLATFORM_BK7238 || PLATFORM_BK7252N
|
||||
#if PLATFORM_BK7231N || PLATFORM_BEKEN_NEW
|
||||
#include "arm_arch.h"
|
||||
|
||||
#if PLATFORM_BEKEN_NEW
|
||||
@ -12,6 +12,10 @@
|
||||
|
||||
#include "../../beken378/driver/general_dma/general_dma.h"
|
||||
#if PLATFORM_BEKEN_NEW
|
||||
#if !PLATFORM_BK7231N && !PLATFORM_BK7238 && !PLATFORM_BK7252N
|
||||
#undef CFG_SOC_NAME
|
||||
#define CFG_SOC_NAME 5
|
||||
#endif
|
||||
#include "spi_bk7231n.h"
|
||||
#else
|
||||
#include "../../beken378/driver/spi/spi.h"
|
||||
@ -181,7 +185,7 @@ static void spidma_spi_configure(UINT32 rate, UINT32 mode) {
|
||||
//sddev_control(SPI_DEV_NAME, CMD_SPI_SET_BITWIDTH, (void *)¶m);
|
||||
|
||||
/* baudrate */
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "max_hz = %d \n", rate);
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "max_hz = %d \n", rate);
|
||||
//setSpiCtrlRegister(BIT_WDTH, param);
|
||||
spi_set_clock(rate);
|
||||
//sddev_control(SPI_DEV_NAME, CMD_SPI_SET_CKR, (void *)&rate);
|
||||
@ -230,7 +234,7 @@ static void spidma_spi_configure(UINT32 rate, UINT32 mode) {
|
||||
//sddev_control(SPI_DEV_NAME, CMD_SPI_UNIT_ENABLE, (void *)¶m);
|
||||
|
||||
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "spi_master:[CTRL]:0x%08x \n", REG_READ(SPI_CTRL));
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "spi_master:[CTRL]:0x%08x \n", REG_READ(SPI_CTRL));
|
||||
}
|
||||
|
||||
static void spidma_spi_unconfigure(void) {
|
||||
@ -274,7 +278,7 @@ void spidma_spi_dma_tx_finish_callback(UINT32 param) {
|
||||
rtos_set_semaphore(&spi_dev->dma_tx_sem);
|
||||
|
||||
//ToDo: USer
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "spi dma tx finish callback\r\n");
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "spi dma tx finish callback\r\n");
|
||||
spidma_dma_tx_enable(0);
|
||||
}
|
||||
|
||||
@ -283,7 +287,7 @@ int spidma_dma_master_tx_init(struct spi_message *spi_msg) {
|
||||
GDMACFG_TPYES_ST init_cfg;
|
||||
GDMA_CFG_ST en_cfg;
|
||||
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "spi dma tx init\r\n");
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "spi dma tx init\r\n");
|
||||
os_memset(&init_cfg, 0, sizeof(GDMACFG_TPYES_ST));
|
||||
os_memset(&en_cfg, 0, sizeof(GDMA_CFG_ST));
|
||||
|
||||
@ -313,7 +317,7 @@ int spidma_dma_master_tx_init(struct spi_message *spi_msg) {
|
||||
en_cfg.param = spi_msg->send_len; // dma translen
|
||||
sddev_control(GDMA_DEV_NAME, CMD_GDMA_SET_TRANS_LENGTH, (void *)&en_cfg);
|
||||
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "spi dma tx config: length:%d, first:%d\r\n", spi_msg->send_len, spi_msg->send_buf[0]);
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "spi dma tx config: length:%d, first:%d\r\n", spi_msg->send_len, spi_msg->send_buf[0]);
|
||||
|
||||
en_cfg.channel = SPI_TX_DMA_CHANNEL;
|
||||
en_cfg.param = 0; // 0:not repeat 1:repeat
|
||||
@ -328,7 +332,7 @@ int spidma_dma_master_tx_init(struct spi_message *spi_msg) {
|
||||
|
||||
void spidma_spi_master_dma_config(UINT32 mode, UINT32 rate) {
|
||||
UINT32 param;
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "spi master dma init: mode:%d, rate:%d\r\n", mode, rate);
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "spi master dma init: mode:%d, rate:%d\r\n", mode, rate);
|
||||
spidma_spi_configure(rate, mode);
|
||||
|
||||
//disable tx/rx int disable
|
||||
@ -384,8 +388,8 @@ void spidma_spi_master_dma_config(UINT32 mode, UINT32 rate) {
|
||||
//param = 5000000;
|
||||
//sddev_control(SPI_DEV_NAME, CMD_SPI_SET_CKR, (void *)¶m);
|
||||
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "spi_master [CTRL]:0x%08x \n", REG_READ(SPI_CTRL));
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "spi_master [CONFIG]:0x%08x \n", REG_READ(SPI_CONFIG));
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "spi_master [CTRL]:0x%08x \n", REG_READ(SPI_CTRL));
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "spi_master [CONFIG]:0x%08x \n", REG_READ(SPI_CONFIG));
|
||||
}
|
||||
|
||||
int spidma_spi_master_dma_tx_init(UINT32 mode, UINT32 rate, struct spi_message *spi_msg) {
|
||||
@ -444,7 +448,7 @@ int spidma_spi_master_dma_send(struct spi_message *spi_msg) {
|
||||
}
|
||||
|
||||
if (spi_dev->tx_ptr != spi_msg->send_buf) {
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "spi_dma_send_ set pointer!\n");
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "spi_dma_send_ set pointer!\n");
|
||||
|
||||
GDMA_CFG_ST en_cfg;
|
||||
en_cfg.channel = SPI_TX_DMA_CHANNEL;
|
||||
@ -453,7 +457,7 @@ int spidma_spi_master_dma_send(struct spi_message *spi_msg) {
|
||||
spi_dev->tx_ptr = spi_msg->send_buf;
|
||||
}
|
||||
if (spi_dev->tx_len != spi_msg->send_len) {
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "spi_dma_send_ set length!\n");
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "spi_dma_send_ set length!\n");
|
||||
|
||||
GDMA_CFG_ST en_cfg;
|
||||
//spi_ctrl(CMD_SPI_TXTRANS_EN, (void *)&spi_msg->send_len);
|
||||
@ -467,10 +471,10 @@ int spidma_spi_master_dma_send(struct spi_message *spi_msg) {
|
||||
GLOBAL_INT_DISABLE();
|
||||
spi_dev->flag |= TX_FINISH_FLAG;
|
||||
GLOBAL_INT_RESTORE();
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "before enable tx 0x%08x\r\n", REG_READ(SPI_CONFIG));
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "before enable tx 0x%08x\r\n", REG_READ(SPI_CONFIG));
|
||||
|
||||
spidma_dma_tx_enable(1);
|
||||
ADDLOG_DEBUG(LOG_FEATURE_CMD, "enable tx 0x%08x\r\n", REG_READ(SPI_CONFIG));
|
||||
ADDLOG_EXTRADEBUG(LOG_FEATURE_CMD, "enable tx 0x%08x\r\n", REG_READ(SPI_CONFIG));
|
||||
/* wait tx finish */
|
||||
//if (user_dma_tx_finish_callback == NULL) {
|
||||
//因为写DMA是主动操作,所以DMA传输完成后,SPI不一定发送完成了。
|
||||
@ -520,4 +524,177 @@ void SPIDMA_StopTX() {
|
||||
spidma_master_dma_tx_disable();
|
||||
}
|
||||
|
||||
void SPIDMA_Deinit(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#elif PLATFORM_ESPIDF
|
||||
|
||||
#include "../new_cfg.h"
|
||||
#include "../new_common.h"
|
||||
#include "../new_pins.h"
|
||||
#include "../hal/espidf/hal_pinmap_espidf.h"
|
||||
|
||||
#include "drv_spidma.h"
|
||||
#include "driver/spi_common.h"
|
||||
#include "driver/spi_master.h"
|
||||
#include "soc/spi_reg.h"
|
||||
|
||||
#if SOC_SPI_PERIPH_NUM > 2
|
||||
spi_host_device_t obk_spi_host = SPI3_HOST;
|
||||
#else
|
||||
spi_host_device_t obk_spi_host = SPI2_HOST;
|
||||
#endif
|
||||
|
||||
spi_device_handle_t obk_spidma;
|
||||
extern int spidma_led_pin;
|
||||
|
||||
void SPIDMA_Init(struct spi_message* msg)
|
||||
{
|
||||
spi_bus_config_t buscfg =
|
||||
{
|
||||
.miso_io_num = -1,
|
||||
.mosi_io_num = spidma_led_pin > 0 ? (int)g_pins[spidma_led_pin].pin : -1,
|
||||
.sclk_io_num = -1,
|
||||
.quadwp_io_num = -1,
|
||||
.quadhd_io_num = -1,
|
||||
.max_transfer_sz = msg->send_len,
|
||||
};
|
||||
|
||||
spi_device_interface_config_t devcfg =
|
||||
{
|
||||
.clock_speed_hz = 3000000,
|
||||
.mode = 0,
|
||||
.spics_io_num = -1,
|
||||
.queue_size = 1,
|
||||
.command_bits = 0,
|
||||
.address_bits = 0,
|
||||
};
|
||||
|
||||
spi_bus_initialize(obk_spi_host, &buscfg, SPI_DMA_CH_AUTO);
|
||||
spi_bus_add_device(obk_spi_host, &devcfg, &obk_spidma);
|
||||
}
|
||||
|
||||
void SPIDMA_StartTX(struct spi_message* msg)
|
||||
{
|
||||
spi_transaction_t transaction = { 0 };
|
||||
transaction.length = msg->send_len * 8; // bits, not bytes
|
||||
transaction.tx_buffer = msg->send_buf;
|
||||
spi_device_transmit(obk_spidma, &transaction);
|
||||
}
|
||||
|
||||
void SPIDMA_StopTX(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SPIDMA_Deinit(void)
|
||||
{
|
||||
spi_bus_remove_device(obk_spidma);
|
||||
spi_bus_free(obk_spi_host);
|
||||
}
|
||||
|
||||
#elif PLATFORM_LN882H
|
||||
|
||||
// this uses SPI + DMA
|
||||
// for native implementation, see https://github.com/openshwprojects/OpenBK7231T_App/pull/1414
|
||||
|
||||
#include "../new_cfg.h"
|
||||
#include "../new_common.h"
|
||||
#include "../new_pins.h"
|
||||
|
||||
#include "drv_spidma.h"
|
||||
#include "../hal/ln882h/hal_pinmap_ln882h.h"
|
||||
#include "hal/hal_dma.h"
|
||||
#include "hal/hal_spi.h"
|
||||
|
||||
extern int spidma_led_pin;
|
||||
static int current_pin = 6;
|
||||
|
||||
void SPIDMA_Init(struct spi_message* msg)
|
||||
{
|
||||
current_pin = spidma_led_pin > 0 ? spidma_led_pin : 6;
|
||||
lnPinMapping_t* pin = g_pins + current_pin;
|
||||
|
||||
hal_gpio_pin_afio_select(pin->base, pin->pin, SPI0_MOSI);
|
||||
hal_gpio_pin_afio_en(pin->base, pin->pin, HAL_ENABLE);
|
||||
|
||||
spi_init_type_def spi_init =
|
||||
{
|
||||
.spi_baud_rate_prescaler = SPI_BAUDRATEPRESCALER_16,
|
||||
.spi_mode = SPI_MODE_MASTER,
|
||||
.spi_data_size = SPI_DATASIZE_8B,
|
||||
.spi_first_bit = SPI_FIRST_BIT_MSB,
|
||||
.spi_cpol = SPI_CPOL_LOW,
|
||||
.spi_cpha = SPI_CPHA_1EDGE,
|
||||
};
|
||||
|
||||
hal_spi_init(SPI0_BASE, &spi_init);
|
||||
hal_spi_en(SPI0_BASE, HAL_ENABLE);
|
||||
hal_spi_ssoe_en(SPI0_BASE, HAL_DISABLE);
|
||||
|
||||
dma_init_t_def dma_init =
|
||||
{
|
||||
.dma_mem_addr = (uint32_t)msg->send_buf,
|
||||
.dma_data_num = msg->send_len,
|
||||
.dma_dir = DMA_READ_FORM_MEM,
|
||||
.dma_mem_inc_en = DMA_MEM_INC_EN,
|
||||
.dma_p_addr = SPI0_DATA_REG,
|
||||
.dma_p_size = DMA_P_SIZE_8_BIT,
|
||||
.dma_mem_size = DMA_MEM_SIZE_8_BIT,
|
||||
};
|
||||
|
||||
hal_dma_init(DMA_CH_4, &dma_init);
|
||||
hal_dma_en(DMA_CH_4, HAL_DISABLE);
|
||||
}
|
||||
|
||||
void SPIDMA_StartTX(struct spi_message* msg)
|
||||
{
|
||||
hal_dma_set_mem_addr(DMA_CH_4, (uint32_t)msg->send_buf);
|
||||
hal_dma_set_data_num(DMA_CH_4, msg->send_len);
|
||||
|
||||
hal_spi_dma_en(SPI0_BASE, SPI_DMA_TX_EN, HAL_ENABLE);
|
||||
hal_dma_en(DMA_CH_4, HAL_ENABLE);
|
||||
|
||||
while(hal_dma_get_data_num(DMA_CH_4) != 0);
|
||||
|
||||
hal_dma_en(DMA_CH_4, HAL_DISABLE);
|
||||
hal_spi_dma_en(SPI0_BASE, SPI_DMA_TX_EN, HAL_DISABLE);
|
||||
}
|
||||
|
||||
void SPIDMA_StopTX(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SPIDMA_Deinit(void)
|
||||
{
|
||||
hal_spi_en(SPI0_BASE, HAL_DISABLE);
|
||||
hal_spi_deinit(SPI0_BASE);
|
||||
lnPinMapping_t* pin = g_pins + current_pin;
|
||||
hal_gpio_pin_afio_en(pin->base, pin->pin, HAL_DISABLE);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "drv_spidma.h"
|
||||
|
||||
void SPIDMA_Init(struct spi_message* msg)
|
||||
{
|
||||
|
||||
}
|
||||
void SPIDMA_StartTX(struct spi_message* msg)
|
||||
{
|
||||
|
||||
}
|
||||
void SPIDMA_StopTX(void)
|
||||
{
|
||||
|
||||
}
|
||||
void SPIDMA_Deinit(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
#include "../new_common.h"
|
||||
|
||||
#if PLATFORM_BK7231N || PLATFORM_BK7238 || PLATFORM_BK7252N
|
||||
#if PLATFORM_BK7231N || PLATFORM_BEKEN_NEW
|
||||
|
||||
#include "arm_arch.h"
|
||||
#include "drv_model_pub.h"
|
||||
@ -15,33 +15,23 @@
|
||||
#include "uart_pub.h"
|
||||
#include "spi_pub.h"
|
||||
#if PLATFORM_BEKEN_NEW
|
||||
#undef SPI_DAT
|
||||
#undef SPI_BASE
|
||||
#define GFUNC_MODE_SPI_USE_GPIO_14 GFUNC_MODE_SPI_GPIO_14
|
||||
#define GFUNC_MODE_SPI_USE_GPIO_16_17 GFUNC_MODE_SPI_GPIO_16_17
|
||||
#endif
|
||||
|
||||
#elif WINDOWS
|
||||
|
||||
struct spi_message
|
||||
{
|
||||
byte*send_buf;
|
||||
unsigned int send_len;
|
||||
|
||||
byte*recv_buf;
|
||||
unsigned int recv_len;
|
||||
};
|
||||
|
||||
typedef int beken_semaphore_t;
|
||||
typedef int beken_mutex_t;
|
||||
|
||||
#endif
|
||||
|
||||
#define SPI_TX_DMA_CHANNEL GDMA_CHANNEL_3
|
||||
|
||||
#define SPI_PERI_CLK_26M (26 * 1000 * 1000)
|
||||
#define SPI_PERI_CLK_DCO (120 * 1000 * 1000)
|
||||
|
||||
#define SPI_BASE (0x00802700)
|
||||
#if PLATFORM_BK7231N || PLATFORM_BK7238 || PLATFORM_BK7252N
|
||||
#define SPI_DAT (SPI_BASE + 3 * 4)
|
||||
#else
|
||||
#define SPI_DAT (SPI_BASE + 2 * 4)
|
||||
#endif
|
||||
#define SPI_CONFIG (SPI_BASE + 0x1 * 4)
|
||||
#define SPI_TX_EN (0x01UL << 0)
|
||||
|
||||
@ -66,6 +56,20 @@ struct bk_spi_dev {
|
||||
volatile uint32_t flag;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
struct spi_message
|
||||
{
|
||||
byte* send_buf;
|
||||
unsigned int send_len;
|
||||
|
||||
byte* recv_buf;
|
||||
unsigned int recv_len;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
void SPIDMA_Init(struct spi_message *spi_msg);
|
||||
void SPIDMA_StartTX(struct spi_message *spi_msg);
|
||||
void SPIDMA_StopTX(void);
|
||||
void SPIDMA_Deinit(void);
|
||||
|
||||
16
src/hal/ln882h/hal_pinmap_ln882h.h
Normal file
16
src/hal/ln882h/hal_pinmap_ln882h.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifdef PLATFORM_LN882H
|
||||
|
||||
#include "hal/hal_gpio.h"
|
||||
|
||||
typedef struct lnPinMapping_s
|
||||
{
|
||||
const char* name;
|
||||
uint32_t base;
|
||||
gpio_pin_t pin;
|
||||
int8_t pwm_cha;
|
||||
} lnPinMapping_t;
|
||||
|
||||
extern lnPinMapping_t g_pins[];
|
||||
extern int g_numPins;
|
||||
|
||||
#endif // PLATFORM_LN882H
|
||||
@ -4,8 +4,8 @@
|
||||
#include "../../logging/logging.h"
|
||||
#include "../../new_cfg.h"
|
||||
#include "../../new_pins.h"
|
||||
#include "hal_pinmap_ln882h.h"
|
||||
// LN882H header
|
||||
#include "hal/hal_gpio.h"
|
||||
#include "hal/hal_adv_timer.h"
|
||||
#include "hal/hal_clock.h"
|
||||
|
||||
@ -13,13 +13,6 @@
|
||||
|
||||
static int g_active_pwm = 0b0;
|
||||
|
||||
typedef struct lnPinMapping_s {
|
||||
const char *name;
|
||||
uint32_t base;
|
||||
gpio_pin_t pin;
|
||||
int8_t pwm_cha;
|
||||
} lnPinMapping_t;
|
||||
|
||||
lnPinMapping_t g_pins[] = {
|
||||
{ "A0", GPIOA_BASE, GPIO_PIN_0, -1 },
|
||||
{ "A1", GPIOA_BASE, GPIO_PIN_1, -1 },
|
||||
@ -51,7 +44,7 @@ lnPinMapping_t g_pins[] = {
|
||||
// ETC TODO
|
||||
};
|
||||
|
||||
static int g_numPins = sizeof(g_pins) / sizeof(g_pins[0]);
|
||||
int g_numPins = sizeof(g_pins) / sizeof(g_pins[0]);
|
||||
|
||||
int HAL_PIN_Find(const char *name) {
|
||||
if (isdigit(name[0])) {
|
||||
|
||||
@ -142,6 +142,7 @@ HassDeviceInfo* hass_createSelectEntityIndexed(const char* state_topic, const ch
|
||||
const char* options[], const char* title);
|
||||
|
||||
HassDeviceInfo* hass_createToggle(const char *label, const char *stateTopic, const char *commandTopic);
|
||||
HassDeviceInfo* hass_init_textField_info(int index);
|
||||
const char* hass_build_discovery_json(HassDeviceInfo* info);
|
||||
void hass_free_device_info(HassDeviceInfo* info);
|
||||
char *hass_generate_multiplyAndRound_template(int decimalPlacesForRounding, int decimalPointOffset, int divider);
|
||||
|
||||
704
src/obk_config.h
704
src/obk_config.h
@ -4,15 +4,15 @@
|
||||
#ifndef OBK_CONFIG_H
|
||||
#define OBK_CONFIG_H
|
||||
|
||||
#define OBK_VARIANT_DEFAULT 0
|
||||
#define OBK_VARIANT_BERRY 1
|
||||
#define OBK_VARIANT_TUYAMCU 2
|
||||
#define OBK_VARIANT_POWERMETERING 3
|
||||
#define OBK_VARIANT_IRREMOTEESP 4
|
||||
#define OBK_VARIANT_SENSORS 5
|
||||
#define OBK_VARIANT_ESP2M 1
|
||||
#define OBK_VARIANT_ESP4M 2
|
||||
#define OBK_VARIANT_ESP2M_BERRY 3
|
||||
#define OBK_VARIANT_DEFAULT 0
|
||||
#define OBK_VARIANT_BERRY 1
|
||||
#define OBK_VARIANT_TUYAMCU 2
|
||||
#define OBK_VARIANT_POWERMETERING 3
|
||||
#define OBK_VARIANT_IRREMOTEESP 4
|
||||
#define OBK_VARIANT_SENSORS 5
|
||||
#define OBK_VARIANT_ESP2M 1
|
||||
#define OBK_VARIANT_ESP4M 2
|
||||
#define OBK_VARIANT_ESP2M_BERRY 3
|
||||
|
||||
// Starts with all driver flags undefined
|
||||
|
||||
@ -21,89 +21,90 @@
|
||||
// Defines for drivers from drv_main.c: ENABLE_DRIVER_*
|
||||
// Other defines: ENABLE_* , for example: ENABLE_LED_BASIC
|
||||
|
||||
#define ENABLE_HTTP_MQTT 1
|
||||
#define ENABLE_HTTP_IP 1
|
||||
#define ENABLE_HTTP_WEBAPP 1
|
||||
#define ENABLE_HTTP_NAMES 1
|
||||
#define ENABLE_HTTP_MAC 1
|
||||
#define ENABLE_HTTP_FLAGS 1
|
||||
#define ENABLE_HTTP_STARTUP 1
|
||||
#define ENABLE_HTTP_PING 1
|
||||
#define ENABLE_LED_BASIC 1
|
||||
#define ENABLE_HTTP_MQTT 1
|
||||
#define ENABLE_HTTP_IP 1
|
||||
#define ENABLE_HTTP_WEBAPP 1
|
||||
#define ENABLE_HTTP_NAMES 1
|
||||
#define ENABLE_HTTP_MAC 1
|
||||
#define ENABLE_HTTP_FLAGS 1
|
||||
#define ENABLE_HTTP_STARTUP 1
|
||||
#define ENABLE_HTTP_PING 1
|
||||
#define ENABLE_LED_BASIC 1
|
||||
|
||||
#if PLATFORM_XRADIO
|
||||
|
||||
// #define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define NO_CHIP_TEMPERATURE 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_HUE 1
|
||||
// #define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define NO_CHIP_TEMPERATURE 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_HUE 1
|
||||
|
||||
#if PLATFORM_XR809
|
||||
#define ENABLE_DRIVER_BATTERY 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_DRIVER_BATTERY 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#endif
|
||||
|
||||
#if PLATFORM_XR806
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#endif
|
||||
|
||||
#elif PLATFORM_W600
|
||||
|
||||
// parse things like $CH1 or $hour etc
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_NTP 1
|
||||
// #define ENABLE_NTP_DST 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
|
||||
#elif PLATFORM_W800
|
||||
|
||||
// parse things like $CH1 or $hour etc
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_OPENWEATHERMAP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_CHARTS 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_DRIVER_SHT3X 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_OPENWEATHERMAP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_CHARTS 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_DRIVER_SHT3X 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
|
||||
#elif WINDOWS
|
||||
|
||||
@ -111,100 +112,99 @@
|
||||
|
||||
#else
|
||||
|
||||
#define ENABLE_SDL_WINDOW 1
|
||||
#define ENABLE_SDL_WINDOW 1
|
||||
|
||||
#endif
|
||||
|
||||
#define ENABLE_DRIVER_TESTSPIFLASH 1
|
||||
#define ENABLE_DRIVER_TESTSPIFLASH 1
|
||||
|
||||
#define ENABLE_HTTP_OVERRIDE 1
|
||||
#define ENABLE_DRIVER_PINMUTEX 1
|
||||
#define ENABLE_DRIVER_TCL 1
|
||||
#define ENABLE_DRIVER_PIR 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_NTP_DST 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_BL0942SPI 1
|
||||
#define ENABLE_DRIVER_CSE7766 1
|
||||
#define ENABLE_DRIVER_CSE7761 1
|
||||
#define ENABLE_DRIVER_TESTPOWER 1
|
||||
#define ENABLE_DRIVER_HT16K33 1
|
||||
#define ENABLE_DRIVER_MAX72XX 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_TEST_COMMANDS 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_TEST_DRIVERS 1
|
||||
#define ENABLE_DRIVER_BRIDGE 1
|
||||
#define ENABLE_DRIVER_HTTPBUTTONS 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_HUE 1
|
||||
#define ENABLE_DRIVER_CHARGINGLIMIT 1
|
||||
#define ENABLE_DRIVER_BATTERY 1
|
||||
#define ENABLE_DRIVER_PT6523 1
|
||||
#define ENABLE_DRIVER_MAX6675 1
|
||||
#define ENABLE_DRIVER_TEXTSCROLLER 1
|
||||
#define ENABLE_NTP_SUNRISE_SUNSET 1
|
||||
#define ENABLE_HTTP_OVERRIDE 1
|
||||
#define ENABLE_DRIVER_TCL 1
|
||||
#define ENABLE_DRIVER_PIR 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_NTP_DST 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_BL0942SPI 1
|
||||
#define ENABLE_DRIVER_CSE7766 1
|
||||
#define ENABLE_DRIVER_CSE7761 1
|
||||
#define ENABLE_DRIVER_TESTPOWER 1
|
||||
#define ENABLE_DRIVER_HT16K33 1
|
||||
#define ENABLE_DRIVER_MAX72XX 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_TEST_COMMANDS 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_TEST_DRIVERS 1
|
||||
#define ENABLE_DRIVER_BRIDGE 1
|
||||
#define ENABLE_DRIVER_HTTPBUTTONS 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_HUE 1
|
||||
#define ENABLE_DRIVER_CHARGINGLIMIT 1
|
||||
#define ENABLE_DRIVER_BATTERY 1
|
||||
#define ENABLE_DRIVER_PT6523 1
|
||||
#define ENABLE_DRIVER_MAX6675 1
|
||||
#define ENABLE_DRIVER_TEXTSCROLLER 1
|
||||
#define ENABLE_NTP_SUNRISE_SUNSET 1
|
||||
// parse things like $CH1 or $hour etc
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_SM16703P 1
|
||||
#define ENABLE_DRIVER_PIXELANIM 1
|
||||
#define ENABLE_DRIVER_TMGN 1
|
||||
#define ENABLE_DRIVER_DRAWERS 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_DDP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_ADCBUTTON 1
|
||||
#define ENABLE_DRIVER_SM15155E 1
|
||||
// #define ENABLE_DRIVER_IR 1
|
||||
// #define ENABLE_DRIVER_IR2 1
|
||||
#define ENABLE_DRIVER_CHARTS 1
|
||||
#define ENABLE_DRIVER_WIDGET 1
|
||||
#define ENABLE_DRIVER_OPENWEATHERMAP 1
|
||||
#define ENABLE_DRIVER_MCP9808 1
|
||||
#define ENABLE_DRIVER_KP18058 1
|
||||
#define ENABLE_DRIVER_ADCSMOOTHER 1
|
||||
#define ENABLE_DRIVER_SGP 1
|
||||
#define ENABLE_DRIVER_SHIFTREGISTER 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_DRIVER_DS1820_FULL 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_SM16703P 1
|
||||
#define ENABLE_DRIVER_PIXELANIM 1
|
||||
#define ENABLE_DRIVER_TMGN 1
|
||||
#define ENABLE_DRIVER_DRAWERS 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_DDP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_ADCBUTTON 1
|
||||
#define ENABLE_DRIVER_SM15155E 1
|
||||
// #define ENABLE_DRIVER_IR 1
|
||||
// #define ENABLE_DRIVER_IR2 1
|
||||
#define ENABLE_DRIVER_CHARTS 1
|
||||
#define ENABLE_DRIVER_WIDGET 1
|
||||
#define ENABLE_DRIVER_OPENWEATHERMAP 1
|
||||
#define ENABLE_DRIVER_MCP9808 1
|
||||
#define ENABLE_DRIVER_KP18058 1
|
||||
#define ENABLE_DRIVER_ADCSMOOTHER 1
|
||||
#define ENABLE_DRIVER_SGP 1
|
||||
#define ENABLE_DRIVER_SHIFTREGISTER 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_DRIVER_DS1820_FULL 1
|
||||
|
||||
#elif PLATFORM_BL602
|
||||
|
||||
// #define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
// I have enabled drivers on BL602
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define ENABLE_NTP 1
|
||||
// #define ENABLE_NTP_DST 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_CSE7766 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_FREEZE 0
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
// #define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define ENABLE_NTP 1
|
||||
// #define ENABLE_NTP_DST 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_CSE7766 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_FREEZE 0
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
// parse things like $CH1 or $hour etc
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_DDP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
// #define ENABLE_I2C 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_DRIVER_DDP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
// #define ENABLE_I2C 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
|
||||
#if (OBK_VARIANT == OBK_VARIANT_BERRY)
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
@ -212,77 +212,77 @@
|
||||
|
||||
#elif PLATFORM_BEKEN
|
||||
|
||||
//#define ENABLE_LFS_SPI 1
|
||||
//#define ENABLE_DRIVER_TESTSPIFLASH 1
|
||||
//#define ENABLE_LFS_SPI 1
|
||||
//#define ENABLE_DRIVER_TESTSPIFLASH 1
|
||||
|
||||
// #define ENABLE_DRIVER_PIR 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define ENABLE_NTP 1
|
||||
// #define ENABLE_NTP_DST 1
|
||||
#define ENABLE_NTP_SUNRISE_SUNSET 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_BL0942SPI 1
|
||||
#define ENABLE_DRIVER_CSE7766 1
|
||||
// #define ENABLE_DRIVER_BMP280 1
|
||||
// #define ENABLE_DRIVER_PT6523 1
|
||||
// #define ENABLE_DRIVER_MAX6675 1
|
||||
// #define ENABLE_DRIVER_TEXTSCROLLER 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
// #define ENABLE_DRIVER_HT16K33 1
|
||||
// #define ENABLE_DRIVER_MAX72XX 1
|
||||
// #define ENABLE_DRIVER_ADCBUTTON 1
|
||||
#define ENABLE_I2C 1
|
||||
// #define ENABLE_TEST_COMMANDS 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_DRIVER_BRIDGE 1
|
||||
#define ENABLE_DRIVER_HTTPBUTTONS 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_HUE 1
|
||||
// #define ENABLE_DRIVER_CHARGINGLIMIT 1
|
||||
#define ENABLE_DRIVER_BATTERY 1
|
||||
#if PLATFORM_BK7231N || PLATFORM_BK7238 || PLATFORM_BK7252N
|
||||
// #define ENABLE_DRIVER_PWM_GROUP 1
|
||||
#define ENABLE_DRIVER_SM16703P 1
|
||||
#define ENABLE_DRIVER_PIXELANIM 1
|
||||
#define ENABLE_DRIVER_SM15155E 1
|
||||
// #define ENABLE_DRIVER_PIR 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define ENABLE_NTP 1
|
||||
// #define ENABLE_NTP_DST 1
|
||||
#define ENABLE_NTP_SUNRISE_SUNSET 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_BL0942SPI 1
|
||||
#define ENABLE_DRIVER_CSE7766 1
|
||||
// #define ENABLE_DRIVER_BMP280 1
|
||||
// #define ENABLE_DRIVER_PT6523 1
|
||||
// #define ENABLE_DRIVER_MAX6675 1
|
||||
// #define ENABLE_DRIVER_TEXTSCROLLER 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
// #define ENABLE_DRIVER_HT16K33 1
|
||||
// #define ENABLE_DRIVER_MAX72XX 1
|
||||
// #define ENABLE_DRIVER_ADCBUTTON 1
|
||||
#define ENABLE_I2C 1
|
||||
// #define ENABLE_TEST_COMMANDS 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_DRIVER_BRIDGE 1
|
||||
#define ENABLE_DRIVER_HTTPBUTTONS 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_HUE 1
|
||||
// #define ENABLE_DRIVER_CHARGINGLIMIT 1
|
||||
#define ENABLE_DRIVER_BATTERY 1
|
||||
#if PLATFORM_BK7231N || PLATFORM_BEKEN_NEW
|
||||
// #define ENABLE_DRIVER_PWM_GROUP 1
|
||||
#define ENABLE_DRIVER_SM16703P 1
|
||||
#define ENABLE_DRIVER_PIXELANIM 1
|
||||
#define ENABLE_DRIVER_SM15155E 1
|
||||
#endif
|
||||
// parse things like $CH1 or $hour etc
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_TMGN 0
|
||||
#define ENABLE_DRIVER_DRAWERS 0
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
// #define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DDP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_IR 1
|
||||
// #define ENABLE_DRIVER_IR2 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
#define ENABLE_DRIVER_KP18058 1
|
||||
#define ENABLE_DRIVER_ADCSMOOTHER 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
// #define ENABLE_DRIVER_OPENWEATHERMAP 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_TMGN 0
|
||||
#define ENABLE_DRIVER_DRAWERS 0
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
// #define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DDP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_IR 1
|
||||
// #define ENABLE_DRIVER_IR2 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
#define ENABLE_DRIVER_KP18058 1
|
||||
#define ENABLE_DRIVER_ADCSMOOTHER 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
// #define ENABLE_DRIVER_OPENWEATHERMAP 1
|
||||
#if PLATFORM_BEKEN_NEW
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#endif
|
||||
|
||||
// ENABLE_I2C_ is a syntax for
|
||||
// our I2C system defines for drv_i2c_main.c
|
||||
// #define ENABLE_I2C_ADS1115 1
|
||||
// #define ENABLE_I2C_MCP23017 1
|
||||
// #define ENABLE_I2C_LCD_PCF8574 1
|
||||
// #define ENABLE_I2C_ADS1115 1
|
||||
// #define ENABLE_I2C_MCP23017 1
|
||||
// #define ENABLE_I2C_LCD_PCF8574 1
|
||||
|
||||
#if (OBK_VARIANT == OBK_VARIANT_BERRY || OBK_VARIANT == OBK_VARIANT_TUYAMCU || OBK_VARIANT == OBK_VARIANT_POWERMETERING || OBK_VARIANT == OBK_VARIANT_IRREMOTEESP)
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#endif
|
||||
|
||||
#if (OBK_VARIANT == OBK_VARIANT_TUYAMCU || OBK_VARIANT == OBK_VARIANT_POWERMETERING || OBK_VARIANT == OBK_VARIANT_IRREMOTEESP)
|
||||
@ -315,19 +315,19 @@
|
||||
|
||||
#if (OBK_VARIANT == OBK_VARIANT_IRREMOTEESP)
|
||||
#undef ENABLE_DRIVER_DDP
|
||||
#define ENABLE_DRIVER_IRREMOTEESP 1
|
||||
#define ENABLE_DRIVER_IRREMOTEESP 1
|
||||
#endif
|
||||
|
||||
#if (OBK_VARIANT == OBK_VARIANT_SENSORS)
|
||||
#define ENABLE_DRIVER_BMP280 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_SHT3X 1
|
||||
#define ENABLE_DRIVER_DS1820_FULL 1
|
||||
#define ENABLE_DRIVER_BMP280 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_SHT3X 1
|
||||
#define ENABLE_DRIVER_DS1820_FULL 1
|
||||
#endif
|
||||
|
||||
#elif PLATFORM_LN882H
|
||||
|
||||
//#define ENABLE_SEND_POSTANDGET 1
|
||||
//#define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
@ -349,148 +349,152 @@
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_DRIVER_SM16703P 1
|
||||
#define ENABLE_DRIVER_PIXELANIM 1
|
||||
|
||||
#elif PLATFORM_ESPIDF
|
||||
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_NTP 1
|
||||
// #define ENABLE_NTP_DST 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_BATTERY 1
|
||||
#define ENABLE_DRIVER_CHARTS 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_DRIVER_HUE 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_DRIVER_DDP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
// #define ENABLE_DRIVER_CSE7761 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_NTP 1
|
||||
//#define ENABLE_NTP_DST 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_BATTERY 1
|
||||
#define ENABLE_DRIVER_CHARTS 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_DRIVER_HUE 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_DRIVER_DDP 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
//#define ENABLE_DRIVER_CSE7761 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_SM16703P 1
|
||||
#define ENABLE_DRIVER_PIXELANIM 1
|
||||
|
||||
#if (OBK_VARIANT == OBK_VARIANT_ESP4M || OBK_VARIANT == OBK_VARIANT_ESP2M_BERRY)
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#endif
|
||||
|
||||
#elif PLATFORM_TR6260
|
||||
|
||||
// #define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define NO_CHIP_TEMPERATURE 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
// #define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define NO_CHIP_TEMPERATURE 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
|
||||
#elif PLATFORM_REALTEK
|
||||
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define NO_CHIP_TEMPERATURE 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_CSE7766 1
|
||||
#define ENABLE_DRIVER_UART_TCP 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define NO_CHIP_TEMPERATURE 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_CHT83XX 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_DRIVER_CSE7766 1
|
||||
#define ENABLE_DRIVER_UART_TCP 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
|
||||
#ifndef PLATFORM_RTL8710B
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#endif
|
||||
#define ENABLE_DRIVER_TCL 1
|
||||
#define ENABLE_DRIVER_TCL 1
|
||||
|
||||
#elif PLATFORM_ECR6600
|
||||
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
// #define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
// #define ENABLE_SEND_POSTANDGET 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_DHT 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_CALENDAR_EVENTS 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_OBK_BERRY 1
|
||||
|
||||
#elif PLATFORM_ESP8266
|
||||
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define NO_CHIP_TEMPERATURE 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_SEND_POSTANDGET 1
|
||||
#define NO_CHIP_TEMPERATURE 1
|
||||
#define ENABLE_HA_DISCOVERY 1
|
||||
#define ENABLE_MQTT 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
#define NEW_TCP_SERVER 1
|
||||
#define ENABLE_EXPAND_CONSTANT 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
// #define ENABLE_DRIVER_BL0942 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
#define ENABLE_DRIVER_BL0937 1
|
||||
#define ENABLE_TASMOTA_JSON 1
|
||||
#define ENABLE_TASMOTADEVICEGROUPS 1
|
||||
#define ENABLE_I2C 1
|
||||
#define ENABLE_DRIVER_AHT2X 1
|
||||
#define ENABLE_NTP 1
|
||||
#define ENABLE_DRIVER_LED 1
|
||||
#define ENABLE_DRIVER_WEMO 1
|
||||
#define ENABLE_DRIVER_SSDP 1
|
||||
#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#define ENABLE_DRIVER_DS1820 1
|
||||
#define ENABLE_DRIVER_BMPI2C 1
|
||||
|
||||
// #define ENABLE_OBK_BERRY 1
|
||||
|
||||
@ -504,16 +508,16 @@
|
||||
// if Tasmota DGR driver is enabled,
|
||||
// then also enable HTTP config page for that
|
||||
#if ENABLE_TASMOTADEVICEGROUPS
|
||||
#define ENABLE_HTTP_DGR 1
|
||||
#define ENABLE_HTTP_DGR 1
|
||||
#endif
|
||||
|
||||
// if power metering chip is enabled, also enable backend for that
|
||||
#if ENABLE_DRIVER_BL0937 || ENABLE_DRIVER_BL0942 || ENABLE_DRIVER_BL0942SPI || ENABLE_DRIVER_CSE7766
|
||||
#define ENABLE_BL_SHARED 1
|
||||
#define ENABLE_BL_SHARED 1
|
||||
// allow use two BL0942 on two ports +940 bytes
|
||||
// #define ENABLE_BL_TWIN 1
|
||||
// #define ENABLE_BL_TWIN 1
|
||||
// allow moving average energy calculation +180 bytes
|
||||
// #define ENABLE_BL_MOVINGAVG 1
|
||||
// #define ENABLE_BL_MOVINGAVG 1
|
||||
#endif
|
||||
|
||||
// closing OBK_CONFIG_H
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user