* beken new sdk + bk7238

* fix bk7238
This commit is contained in:
NonPIayerCharacter
2025-02-15 00:22:59 +03:00
committed by GitHub
parent 437bd68daa
commit d4d6c69be3
27 changed files with 478 additions and 85 deletions

View File

@ -57,7 +57,7 @@ extern uint32_t current_fw_idx;
#include "temp_detect_pub.h"
#endif
#if defined(PLATFORM_BK7231T) || defined(PLATFORM_BK7231N)
#if (defined(PLATFORM_BK7231T) || defined(PLATFORM_BK7231N)) && !defined(PLATFORM_BEKEN_NEW)
int tuya_os_adapt_wifi_all_ap_scan(AP_IF_S** ap_ary, unsigned int* num);
int tuya_os_adapt_wifi_release_ap(AP_IF_S* ap);
#endif
@ -1305,7 +1305,7 @@ int http_fn_cfg_wifi(http_request_t* request) {
hprintf255(request, "[%i/%i] SSID: %s, Channel: %i, Signal %i<br>", (i+1), (int)ap_num, ap_info[i].ssid, ap_info[i].channel, ap_info[i].rssi);
}
vPortFree(ap_info);
#elif PLATFORM_BK7231T
#elif defined(PLATFORM_BK7231T) && !defined(PLATFORM_BEKEN_NEW)
int i;
AP_IF_S* ar;
@ -1318,7 +1318,7 @@ int http_fn_cfg_wifi(http_request_t* request) {
hprintf255(request, "[%i/%i] SSID: %s, Channel: %i, Signal %i<br>", i, (int)num, ar[i].ssid, ar[i].channel, ar[i].rssi);
}
tuya_hal_wifi_release_ap(ar);
#elif PLATFORM_BK7231N
#elif defined(PLATFORM_BK7231N) && !defined(PLATFORM_BEKEN_NEW)
int i;
AP_IF_S* ar;
@ -1352,6 +1352,8 @@ int http_fn_cfg_wifi(http_request_t* request) {
poststr(request, "TODO TR6260<br>");
#elif defined(PLATFORM_REALTEK)
poststr(request, "TODO Realtek<br>");
#elif PLATFORM_BEKEN_NEW
poststr(request, "TODO BEKEN_NEW<br>");
#else
#error "Unknown platform"
poststr(request, "Unknown platform<br>");

View File

@ -150,7 +150,8 @@ exit:
if (reply != NULL)
os_free(reply);
lwip_close(fd);;
lwip_close(fd);
#if DISABLE_SEPARATE_THREAD_FOR_EACH_TCP_CLIENT
#else

View File

@ -588,7 +588,7 @@ void setupAllWB2SPinsAsButtons() {
// call with str == NULL to force send. - can be binary.
// supply length
int postany(http_request_t* request, const char* str, int len) {
#if PLATFORM_BL602
#if PLATFORM_BL602 || PLATFORM_BEKEN_NEW
send(request->fd, str, len, 0);
return 0;
#else

View File

@ -277,9 +277,7 @@ static int http_rest_post(http_request_t* request) {
return http_rest_post_reboot(request);
}
if (!strcmp(request->url, "api/ota")) {
#if PLATFORM_BK7231T
return http_rest_post_flash(request, START_ADR_OF_BK_PARTITION_OTA, LFS_BLOCKS_END);
#elif PLATFORM_BK7231N
#if PLATFORM_BEKEN
return http_rest_post_flash(request, START_ADR_OF_BK_PARTITION_OTA, LFS_BLOCKS_END);
#elif PLATFORM_W600
return http_rest_post_flash(request, -1, -1);