Skip to content

Commit

Permalink
PT6523 STUB
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Oct 28, 2023
1 parent 4d05eed commit 0e9ac33
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions openBeken_win32_mvsc2017.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Win32 ScriptOnly|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\driver\drv_ntp_events.c" />
<ClCompile Include="src\driver\drv_pt6523.c" />
<ClCompile Include="src\driver\drv_pwmToggler.c" />
<ClCompile Include="src\driver\drv_pwrCal.c" />
<ClCompile Include="src\driver\drv_sgp.c" />
Expand Down
3 changes: 3 additions & 0 deletions openBeken_win32_mvsc2017.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,9 @@
<ClCompile Include="src\driver\drv_adcSmoother.c">
<Filter>Drv</Filter>
</ClCompile>
<ClCompile Include="src\driver\drv_pt6523.c">
<Filter>Drv</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\new_cfg.h" />
Expand Down
3 changes: 3 additions & 0 deletions src/driver/drv_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ void DRV_MAX72XX_Clock_Init();
void DRV_ADCButton_Init();
void DRV_ADCButton_RunFrame();

void PT6523_Init();
void PT6523_RunFrame();

void SM2135_Init();

void SM2235_Init();
Expand Down
7 changes: 7 additions & 0 deletions src/driver/drv_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ static driver_t g_drivers[] = {
//drvdetail:"requires":""}
{ "CSE7766", CSE7766_Init, CSE7766_RunFrame, BL09XX_AppendInformationToHTTPIndexPage, NULL, NULL, NULL, false },
#endif
#ifdef ENABLE_DRIVER_PT6523
//drvdetail:{"name":"PT6523",
//drvdetail:"title":"TODO",
//drvdetail:"descr":"BQQQK",
//drvdetail:"requires":""}
{ "PT6523", PT6523_Init, PT6523_RunFrame, NULL, NULL, NULL, NULL, false },
#endif
#if PLATFORM_BEKEN
#if PLATFORM_BK7231N
//drvdetail:{"name":"SM16703P",
Expand Down
30 changes: 30 additions & 0 deletions src/driver/drv_pt6523.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

#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 "drv_uart.h"
#include "../httpserver/new_http.h"
#include "../hal/hal_pins.h"

byte pt_inh = 10;
byte pt_ce = 11;
byte pt_clk = 24;
byte pt_di = 8;

void PT6523_Init()
{
}


void PT6523_RunFrame()
{
}




2 changes: 2 additions & 0 deletions src/obk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#define ENABLE_DRIVER_HUE 1
#define ENABLE_DRIVER_CHARGINGLIMIT 1
#define ENABLE_DRIVER_BATTERY 1
#define ENABLE_DRIVER_PT6523 1


#elif PLATFORM_BL602
Expand All @@ -73,6 +74,7 @@
#define ENABLE_DRIVER_BL0942 1
#define ENABLE_DRIVER_BL0942SPI 1
#define ENABLE_DRIVER_CSE7766 1
#define ENABLE_DRIVER_PT6523 0
#define ENABLE_DRIVER_TUYAMCU 1
//#define ENABLE_DRIVER_HT16K33 1
//#define ENABLE_DRIVER_MAX72XX 1
Expand Down

0 comments on commit 0e9ac33

Please sign in to comment.