From fe4e61eba3b70273ee337a6669c63b96f9727a35 Mon Sep 17 00:00:00 2001 From: Tester23 Date: Fri, 23 Feb 2024 22:59:57 +0100 Subject: [PATCH] MAX6675 stub --- openBeken_win32_mvsc2017.vcxproj | 1 + openBeken_win32_mvsc2017.vcxproj.filters | 1 + src/driver/drv_local.h | 3 +++ src/driver/drv_main.c | 7 +++++++ src/driver/drv_max6675.c | 18 ++++++++++++++++++ src/obk_config.h | 2 ++ 6 files changed, 32 insertions(+) create mode 100644 src/driver/drv_max6675.c diff --git a/openBeken_win32_mvsc2017.vcxproj b/openBeken_win32_mvsc2017.vcxproj index b65701c99..64e4f1fcb 100644 --- a/openBeken_win32_mvsc2017.vcxproj +++ b/openBeken_win32_mvsc2017.vcxproj @@ -363,6 +363,7 @@ true + diff --git a/openBeken_win32_mvsc2017.vcxproj.filters b/openBeken_win32_mvsc2017.vcxproj.filters index 014311d36..7349a6108 100644 --- a/openBeken_win32_mvsc2017.vcxproj.filters +++ b/openBeken_win32_mvsc2017.vcxproj.filters @@ -326,6 +326,7 @@ + diff --git a/src/driver/drv_local.h b/src/driver/drv_local.h index 112877f85..97139ba01 100644 --- a/src/driver/drv_local.h +++ b/src/driver/drv_local.h @@ -128,6 +128,9 @@ void ChargingLimit_AppendInformationToHTTPIndexPage(http_request_t *request); void RN8209_Init(void); void RN8029_RunEverySecond(void); +void MAX6675_Init(void); +void MAX6675_RunEverySecond(void); + void PWMG_Init(); #define SM2135_DELAY 4 diff --git a/src/driver/drv_main.c b/src/driver/drv_main.c index b5242175d..7a991f38a 100644 --- a/src/driver/drv_main.c +++ b/src/driver/drv_main.c @@ -172,6 +172,13 @@ static driver_t g_drivers[] = { //drvdetail:"requires":""} { "CSE7766", CSE7766_Init, CSE7766_RunEverySecond, BL09XX_AppendInformationToHTTPIndexPage, NULL, NULL, NULL, false }, #endif +#if ENABLE_DRIVER_MAX6675 + //drvdetail:{"name":"MAX6675", + //drvdetail:"title":"TODO", + //drvdetail:"descr":"BQQQK", + //drvdetail:"requires":""} + { "MAX6675", MAX6675_Init, MAX6675_RunEverySecond, NULL, NULL, NULL, NULL, false }, +#endif #if ENABLE_DRIVER_PT6523 //drvdetail:{"name":"PT6523", //drvdetail:"title":"TODO", diff --git a/src/driver/drv_max6675.c b/src/driver/drv_max6675.c new file mode 100644 index 000000000..fd644c7f6 --- /dev/null +++ b/src/driver/drv_max6675.c @@ -0,0 +1,18 @@ +// NOTE: based on https://github.com/RobTillaart/HT16K33.git MIT code +#include "../new_common.h" +#include "../new_pins.h" +#include "../new_cfg.h" +// Commands register, execution API and cmd tokenizer +#include "../cmnds/cmd_public.h" +#include "../mqtt/new_mqtt.h" +#include "../logging/logging.h" +#include "drv_local.h" +#include "../hal/hal_pins.h" + +void MAX6675_RunEverySecond() { + +} + +void MAX6675_Init() { + +} diff --git a/src/obk_config.h b/src/obk_config.h index 0162beab9..dbdc4acfb 100644 --- a/src/obk_config.h +++ b/src/obk_config.h @@ -54,6 +54,7 @@ #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 @@ -84,6 +85,7 @@ #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