Commit Graph

242 Commits

Author SHA1 Message Date
e9e20ed445 esp8266 ADC, EEPROM driver, max7219 simulator
* test

* Update workflow.yaml

* t

* makes

* Update drv_simpleEEPROM.c

* Update drv_simpleEEPROM.c

* ber

* Update workflow.yaml

* tt

* ber

* charts

* owm

* tt

* rem charts

* smaller

* test

* test

* fixes

* test

* charts

* comments

* test

* tt

* test

* add file to proj

* try to add pin 13 as ADC (testing in progress)

* test

* test

* MAX7219 simulator HACK

* final fixes

* Update drv_max72xx_internal.c

* restore

* fx
2025-11-23 14:01:04 +01:00
9581b34b95 bl602 fast connect (#1868) 2025-11-22 16:32:21 +01:00
787558adb1 Update hal_pins_espidf.c (#1864)
#1863
2025-11-18 21:50:19 +01:00
f2c87bf690 merge max72xx clock progress and i2c pinwide scanner and misc fixes
* MAX72XX

* better

* faster buof

* eext

* test

* fx

* fxes

* tr

* fx

* Update drv_max72xx_clock.c

* fxes

* test

* fxes

* tests fxes

* fxes

* scr

* fx

* Update drv_local.h

* show

* Update drv_max72xx_clock.c

* test

* Delete lastEnumTemplate.txt

* TEST

* scan

* Update drv_main.c

* Update obk_main.cmake

* Update drv_multiPinI2CScanner.c

* dbg

* fxes

* Update drv_multiPinI2CScanner.c

* Update drv_multiPinI2CScanner.c

* Update drv_multiPinI2CScanner.c

* owm

* osm test

* restorew platfotms

* Update selftest_openWeatherMap.c

* test

* getter

* Update obk_config.h
2025-11-11 16:27:13 +01:00
73bbc45126 merge partition search driver (disabled by default)
* test

* search

* fx

* fx1

* enavble

* Update obk_main.mk

* 0x200000

* Update drv_bkPartitions.c

* chk

* crc

* finalize

* fxes
2025-11-04 20:29:54 +01:00
f2335b803f Fix RDA release (#1840)
* fix rda release

* ali bootloader
2025-10-22 01:09:49 +02:00
365a0dbcf9 rda5981 ota (#1839)
* rda5981 ota

* easyflash and lfs

* adjust offsets

* mac change
2025-10-21 09:08:48 +02:00
5a83d0268b tr6260 quick pwm fix (#1838)
* tr6260 fix pwm

* forgot gpio14

* tr6260 interrupts
2025-10-20 22:52:22 +02:00
f5a3b2642b RTL new fix OTA (#1836)
* RTL new fix OTA
clean-up workflow

* fix esp cache?
2025-10-17 08:44:13 +02:00
4a2ae013ed HLW8112 Driver for energy measurments (#1810)
* initial test driver for hlw8112

Signed-off-by: Nizam <code@maxters.net>

* restrict build to BK7231N
will stub other platforms later

Signed-off-by: Nizam <code@maxters.net>

* fix newer gcc build

Signed-off-by: Nizam <code@maxters.net>

* fix channel b stat restore
after all i still doesnt get pointer arithmetic

Signed-off-by: Nizam <code@maxters.net>

* clean up flashvar bk7231 still use emetering struct to store data

Signed-off-by: Nizam <code@maxters.net>

* fix OpenBK7231N_ALT build fail

Signed-off-by: Nizam <code@maxters.net>

* disable incomplete spi device raw access commands and ui

Signed-off-by: Nizam <code@maxters.net>

* remove mqtt hack for commands. leverage existing tasmota command framework

Signed-off-by: Nizam <code@maxters.net>

* missed flashvar restore

Signed-off-by: Nizam <code@maxters.net>

* disable hlw812 driver for upstream pr

Signed-off-by: Nizam <code@maxters.net>

---------

Signed-off-by: Nizam <code@maxters.net>
2025-09-30 15:04:15 +02:00
8136ebe8d6 rda fix flash vars (#1817) 2025-09-29 11:43:47 +02:00
6083ddfca5 RDA5981 (#1813) 2025-09-29 08:41:36 +02:00
481cc0ede2 DMX works on ESP32 LilyGO, other platforms requires porting code to change baudrate
* ENABLE DMX on ESP

* test

* s

* Update hal_uart_espidf.c

* Update obk_main.cmake

* w

* test

* Update hal_uart_espidf.c

* Update drv_dmx512.c

* test

* test

* test

* w

* t

* c

* t

* test

* T

* Update drv_dmx512.c

* test

* test

* try flush

* try wait

* ticks w

* t

* fx

* 100 ms

* SIM fx

* Update cmd_newLEDDriver.c

* test 2x

* tests

* fixes

* free

* fix

* misc

* b

* hal

* s

* Update workflow.yaml

* pin

* fin

* test

* Update hal_uart_espidf.c
2025-09-14 21:07:24 +02:00
e85b9a67be small update (#1786) 2025-09-05 08:58:42 +02:00
6ee5729064 Changing HAL_Delay_us for Beken (#1727)
* Apply changes for Bekens HAL_Delay_us() as proposed in #1579 by @rpv-tomsk
Add TEST command to simply test usleep on a given pin

tested on BK7231N to work with both drivers (I am aware of) using HAL_Delay_us
DS1820 and DHT (tested on DHT11 only)

Timing on BK7231N looks really good with this driver, at least for usleep > 6 its allways 2 us more:

tested	read by analyzer

500	502
200	202
100	102
 50	 52
 20	 22
 10	 12
  6	  8
  4	  7

Now it's time to test on other Beken platforms, too

* Not working on BK7238 - trying to remove special case for lower usleep, since times are way to small here

* still not working on BK7238 - usleep ok fur > 50 , will not be below 30us according to my tests
so try to use the other approach for 7238, too

* No success on BK7238 - trying once again to use "usleep()" to find a factor with analyzer.

* try factor 6 for BK7238 (HAL_Dely_us(x) -> usleep(6*x))

* Testing factor 6.4 for BK7238

* Fixing BK7252  build not working, simply use original for code

* Restore original code for BK7252

* Change timing for BK7525

* Next try to adjust factors for BK7525

* fix typo

* Add adjustment for powersave on BK7238

* Update obk_config.h - disable ENABLE_DS1820_TEST_US
2025-09-04 18:05:57 +02:00
0d007112b1 TXW817 support (#1779)
* txw81x base no makefile

* txw81x

* gpio fix?

* non-working ota

* mic
2025-09-03 11:46:06 +02:00
948237869f LN882H IR (#1783) 2025-09-03 11:45:24 +02:00
2a7b071445 BL602 interrupts fix (#1782) 2025-08-31 20:05:41 +02:00
f3d3ff412a BL602 irRemoteESP (#1777) 2025-08-30 21:24:04 +02:00
f9134dd3ac BK IR fix? (#1771)
* BK IR fix?

* ir fix
2025-08-27 08:49:45 +02:00
f8b98ca0ff cosmetic only - finally move hal interrupts to _pins files
* moive out

* fixes

* fs

* f1

* fx

* fx?
2025-08-26 12:26:49 +02:00
707bd127ac Split interrupts code into HAL - part 1
* bl602 test

* w600 test

* simplify

* rtl clear

* t

* draft for beken etc

* draft w600

* fxes

* fxes bl602

* realtek

* fx bl_gpio_intmask

* xradio

* esp

* gpio_isr_handler_add cast

* not needed

* reorg

* fx

* ecr

* fxes

* almost?

* HAL_DetachInterrupt fx

* newline

* use hal_pins.h

* counter

* silly fx

* Update hal_pins.h

* XR FIX? HOW I DIDN'T SEE THAT EARLIER

* guard for double call of HAL_DetachInterrupt

* do not do much in interrupt handler routine, apply deltas in quick tick

* try w800 blindly

* try

* tls_clr_gpio_irq_status

* try intptr_t to see if it compiles

* call tls_clr_gpio_irq_status  first?

* fx 2 omg

* frgot

* change to pullup input by default, add partially counter_r

* more

* ADD POS/NEG EDGE FOR MORE PLATFORMS

* esp
2025-08-24 17:29:17 +02:00
9adcd9950f Realtek/BL602 spi led (#1763)
* realtek spi led

* fix RTL_A and RTL_B

* fix esp version

* Update docs
add missing esp8266 pins

* bl602 spi led

* fix

* deinit

* bl602 miso swap
2025-08-18 20:37:18 +02:00
36218fd38e ota cosmetic (#1762)
* step 1

* Update obk_main.mk

* Update OpenBeken.mk

* Update obk_main.cmake

* Update hal_ota_bk7231.c

* Update hal_ota_bk7231.c

* m

* split

* guards

* Update hal_ota_bl602.c

* Update hal_ota_bl602.c

* bk

* better

* header

* w

* TMP

* tttttttt

* Update rest_interface.c

* hal_ota is xradio header....

* undoi

* header

* move

* xradio

* read

* fx

* t

* makefile

* move out xradi o read

* fx

* move out esp

* move out bl602

* move out beken, ln

* move out w8

* ecr tr

* realtek

* Update rest_interface.c

* win

* forgot

* tr6260 split

* Update hal_ota_tr6260.c

* rename ota_progress

* use OTA_GetProgress on all paltforms

* fx

* not needed header

* call OTA_IncrementProgress on OTA so we at laest know that something is happening
2025-08-16 16:04:57 +02:00
a1501c00c4 RTL8721DA (AmebaDplus) and RTL8720E (AmebaLite) (#1718)
* amebadplus

* fix + amebalite

* ota, lfs, fast connect fix

* Fix TCP_MSL and hostname

* Readme and releaserc
fix esp irq

* small fixes

* setting mac on amebad/1

* ameba ir

* win ef

* update sdk & disable rtl8720e rest ota

* fix
2025-08-12 17:28:36 +02:00
b8965817f6 bl602 deep sleep & ecr sdk update (#1743)
* bl602 deep sleep & ecr sdk update

* esp8266 disable wpa3

* platforms.md
2025-08-10 17:08:33 +02:00
94812a2587 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>
2025-08-10 14:46:01 +02:00
aaaa95a8d1 correct spelling and grammar (#1747)
* Update http_fns.c

* Update flags.json

* Update flags.md

* Update selftest_mqtt_get.c

* Update flags.md

* Update flags.json

* Update http_fns.c

* Update user_main.c

* Update drv_ir_new.cpp

* Update subpages.json

* Update flags.json

* Update http_fns.c

* Update flags.md

* Update tcpServer.md

* Update hal_flashConfig.h

* Update flash_pub.h

* Update win_flash_stub.c

* Update hal_flashConfig_bk7231.c
2025-08-10 08:46:49 +02:00
5e363ab42f ln882h update sdk (#1724)
* ln882h update sdk

* Disable test commands
2025-08-09 11:49:03 +02:00
1fe6ab74ed win stub 2025-07-12 08:38:04 +02:00
01c029898d Show correct BSSID in json status instead of a "fake" one (#1689)
* Add HAL_GetWiFiBSSID() and HAL_GetWiFiChannel() commands
Display correct BSSID and channel in JSON status

* Testing bssid RTL

* Typo and new try for RTL

* Fix BSSID returned

* bettter

* test

* Update hal_wifi_xradio.c

---------

Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
2025-07-10 21:51:05 +02:00
a261a71ab1 Update ESP-IDF to v5.5-beta1 and add minimal ESP8266 support (#1707)
* update esp-idf

* esp8266

* fix

* pwm, uart and wifi fix

* fix ota

* fix 1m and ps

* update workflow
2025-07-06 07:54:23 +02:00
217dd1e3e1 fix GET/POST for all platforms, remove some not needed os_* mappings (os_strcpy, os_memset, etc)
* get and post to PLATFORM_ECR6600

* test

* Update http_client.c

* t

* need timer

* iotx_net_init ?

* Update utils_timer.c

* try os_time_get

* try ENABLE_SEND_POSTANDGET on bl602 as welll

* Update utils_net.h

* add httpclient to boufallo mk

* Update utils_timer.c

* Update new_common.h

* time

* try ln882h

* Update utils_timer.c

* OS_STRCPY ETCCC

* esp IDF

* Update new_common.h

* Update utils_timer.c

* Update new_common.h

* remove hal_machw_time_past dependency

* lwip_close_force better

* stub

* simplifyu

* omg typo

* revert

* remove os_strcpy

* remove os_strlen

* memmove

* os_strcmp

* os_strstr

* mem func

* try on xradio

* #define lwip_close_force(x) lwip_close(x)

* SWAP

* typo

* Update utils_timer.c

* rtl

* Update new_common.h

* tr

* #include <stdint.h> is reduntant

* clean hdr

* those headers could be common

* those headers could be common

* disable

---------

Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
2025-07-02 20:46:00 +02:00
3b99b17cc2 Xradios (#1695)
* Xradios

* deep sleep

* xr806

* small adjustments
2025-06-30 18:47:47 +02:00
af37e093d0 bk7231u/bk7231s/bk7252/bk7252n/bk7231t alt. (#1680)
* bk7231u/bk7231t/bk7252 new sdk

* 7252n
2025-06-24 13:16:27 +02:00
fac2cf081c w800 + berry (#1629)
* w800 + berry

* fix w600

* Update XR and makefile

* Berry cmake

* BL602 lfs test

* Update w800

* Fix

* W600 heap

* sensors & bl602

* bl602 delay_us
2025-06-20 09:35:00 +02:00
fe51ee8f47 Update hal_flashConfig_xr809.c 2025-05-06 09:50:27 +02:00
754aca5c01 BL602 powersave workaround (#1630) 2025-05-04 09:54:59 +02:00
5916fbd8a7 Update BL602 code to work with latest sdk. (#1487)
* Support new BL602 SDK

* Update .gitmodules

---------

Co-authored-by: openshwprojects <85486843+openshwprojects@users.noreply.github.com>
2025-05-02 14:42:14 +02:00
5d09349b9d also add XR806 to online builds (it boots but there is some issue with WiFi?)
* Update .gitmodules

* w

* Manually added submodule OpenXR

* Update Makefile

* Update Makefile

* Update Makefile

* Update OpenXR806

* Update OpenXR806

* Update OpenXR806

* Update hal_wifi_xr809.c
2025-04-19 11:58:35 +02:00
fd853eb203 Merge branch 'main' of https://github.com/openshwprojects/OpenBK7231T_App 2025-04-18 20:29:43 +02:00
d70e9e93e1 xr fixes 2025-04-18 20:29:23 +02:00
5b763e3194 Update hal_pins_xr809.c 2025-04-18 18:32:27 +02:00
a5a5b4b7b9 xr872 (A9 camera) 2025-04-18 18:05:04 +02:00
ac3c5d6da6 Faster wifi connecting (up to 2sec restart -> connected) (#1297)
* Wifi fast connect + extra

* --
2025-04-15 16:38:10 +02:00
XJ
5810db7ae1 BL0492 Frequency to HASS (MQTT) + Energy calculation in TWIN_BL_ENABLED mode for channel 2 (#1578)
* twinbl energy for channel 2

* .

* removed movavg

* Added HASS MQTT frequency (both standard and TWIN_MODE)

* .

* simplify, store total only IX0

* Ext BugFix: addChangeHandler Power < 20 appears broken #1543
2025-03-26 13:24:34 +01:00
7ace8c31ba tr6260 (#1564) 2025-03-13 09:01:58 +01:00
544f48d022 ECR6600 (#1553)
* ECR6600

* fix macstr

* uart, bl0937

* vbat adc, ota

* pwm freq

* static ip, change mac

* update partitions
2025-03-07 22:11:42 +01:00
a5301939a7 Update hal_wifi_bk7231.c (#1560)
Ensure that connected event is triggered only once.
2025-03-06 21:07:46 +01:00
55e76b504a PWM frequncy select and move freq code outside hal (#1554)
* test

* w

* fx

* fx

* reapply to change pwm ffreq?

* array
2025-03-02 15:03:20 +01:00