Skip to content

Commit a5a5b4b

Browse files
xr872 (A9 camera)
1 parent 64ec573 commit a5a5b4b

File tree

8 files changed

+30
-10
lines changed

8 files changed

+30
-10
lines changed

src/hal/xr809/hal_main_xr809.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#ifdef PLATFORM_XR809
1+
#if PLATFORM_XR809 || PLATFORM_XR872
22

33
#include "../../new_common.h"
44
#include "../../logging/logging.h"

src/hal/xr809/hal_wifi_xr809.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#ifdef PLATFORM_XR809
1+
#if PLATFORM_XR809 || PLATFORM_XR872
22

33
#include "../hal_wifi.h"
44
#include "../../new_cfg.h"
@@ -14,7 +14,7 @@
1414
#include "common/framework/platform_init.h"
1515
#include "common/framework/sysinfo.h"
1616
#include "common/framework/net_ctrl.h"
17-
#include "serial.h"
17+
//#include "serial.h"
1818
#include "kernel/os/os.h"
1919

2020
#include "lwip/sockets.h"
@@ -82,11 +82,13 @@ static void wlan_msg_recv(uint32_t event, uint32_t data, void *arg)
8282
g_wifiStatusCallback(WIFI_STA_DISCONNECTED);
8383
}
8484
break;
85+
#if !PLATFORM_XR872
8586
case NET_CTRL_MSG_CONNECTION_LOSS:
8687
if(g_wifiStatusCallback!=0) {
8788
g_wifiStatusCallback(WIFI_STA_DISCONNECTED);
8889
}
8990
break;
91+
#endif
9092
case NET_CTRL_MSG_NETWORK_UP:
9193

9294
break;

src/httpserver/http_fns.c

+2
Original file line numberDiff line numberDiff line change
@@ -3150,6 +3150,8 @@ void OTA_RequestDownloadFromHTTP(const char* s) {
31503150
t_http_fwup(s);
31513151
#elif PLATFORM_XR809
31523152
XR809_RequestOTAHTTP(s);
3153+
#elif PLATFORM_XR872
3154+
31533155
#else
31543156
otarequest(s);
31553157
#endif

src/httpserver/http_tcp_server.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#ifdef CREATE_THREAD_PER_EACH_HTTP_CLIENT
2929

3030

31-
#if PLATFORM_XR809
31+
#if PLATFORM_XR809 || PLATFORM_XR872
3232

3333
#define DISABLE_SEPARATE_THREAD_FOR_EACH_TCP_CLIENT 1
3434

src/httpserver/rest_interface.c

+6
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,10 @@ static int http_rest_post_flash(http_request_t* request, int startaddr, int maxa
16201620
return 0; //Operation not supported yet
16211621
#endif
16221622

1623+
#if PLATFORM_XR872
1624+
return 0; //Operation not supported yet
1625+
#endif
1626+
16231627

16241628
int total = 0;
16251629
int towrite = request->bodylen;
@@ -3178,6 +3182,8 @@ static int http_rest_get_flash(http_request_t* request, int startaddr, int len)
31783182
//uint32_t flash_read(uint32_t flash, uint32_t addr,void *buf, uint32_t size)
31793183
#define FLASH_INDEX_XR809 0
31803184
res = flash_read(FLASH_INDEX_XR809, startaddr, buffer, readlen);
3185+
#elif PLATFORM_XR872
3186+
res = 0;
31813187
#elif PLATFORM_BL602
31823188
res = bl_flash_read(startaddr, (uint8_t *)buffer, readlen);
31833189
#elif PLATFORM_W600 || PLATFORM_W800

src/new_common.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ void OTA_RequestDownloadFromHTTP(const char *s);
5353
#define DEVICENAME_PREFIX_SHORT "oxr"
5454
#define PLATFORM_MCU_NAME "XR809"
5555
#define MANUFACTURER "Xradio Technology"
56+
#elif PLATFORM_XR872
57+
#define DEVICENAME_PREFIX_FULL "OpenXR872"
58+
#define DEVICENAME_PREFIX_SHORT "oxr"
59+
#define PLATFORM_MCU_NAME "XR872"
60+
#define MANUFACTURER "Xradio Technology"
5661
#elif PLATFORM_BK7231N
5762
#define DEVICENAME_PREFIX_FULL "OpenBK7231N"
5863
#define DEVICENAME_PREFIX_SHORT "obk"
@@ -350,7 +355,7 @@ OSStatus rtos_suspend_thread(beken_thread_t* thread);
350355
typedef unsigned int u32;
351356

352357

353-
#elif PLATFORM_XR809
358+
#elif PLATFORM_XR809 || PLATFORM_XR872
354359

355360

356361

src/obk_config.h

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
#define NO_CHIP_TEMPERATURE 1
2929
#define OBK_DISABLE_ALL_DRIVERS 1
3030

31+
#elif PLATFORM_XR872
32+
33+
#define NO_CHIP_TEMPERATURE 1
34+
#define OBK_DISABLE_ALL_DRIVERS 1
35+
3136
#elif PLATFORM_W600
3237

3338
// parse things like $CH1 or $hour etc

src/user_main.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int DRV_SSDP_Active = 0;
106106

107107
void Main_ForceUnsafeInit();
108108

109-
#if PLATFORM_XR809
109+
#if PLATFORM_XR809 || PLATFORM_XR872
110110
size_t xPortGetFreeHeapSize() {
111111
return 0;
112112
}
@@ -208,7 +208,7 @@ void extended_app_waiting_for_launch2(void) {
208208
#endif
209209

210210

211-
#if defined(PLATFORM_LN882H) || defined(PLATFORM_ESPIDF)
211+
#if defined(PLATFORM_LN882H) || defined(PLATFORM_ESPIDF) || defined(PLATFORM_XR872)
212212

213213
int LWIP_GetMaxSockets() {
214214
return 0;
@@ -666,7 +666,7 @@ void Main_OnEverySecond()
666666
#if WINDOWS
667667
#elif PLATFORM_BL602
668668
#elif PLATFORM_W600 || PLATFORM_W800
669-
#elif PLATFORM_XR809
669+
#elif PLATFORM_XR809 || PLATFORM_XR872
670670
#elif PLATFORM_BK7231N || PLATFORM_BK7231T
671671
if (ota_progress() == -1)
672672
#endif
@@ -1054,7 +1054,7 @@ void quick_timer_thread(void* param)
10541054
}
10551055
#elif PLATFORM_ESPIDF
10561056
esp_timer_handle_t g_quick_timer;
1057-
#elif PLATFORM_XR809 || PLATFORM_LN882H
1057+
#elif PLATFORM_XR809 || PLATFORM_LN882H || PLATFORM_XR872
10581058
OS_Timer_t g_quick_timer;
10591059
#else
10601060
beken_timer_t g_quick_timer;
@@ -1074,7 +1074,7 @@ void QuickTick_StartThread(void)
10741074

10751075
esp_timer_create(&g_quick_timer_args, &g_quick_timer);
10761076
esp_timer_start_periodic(g_quick_timer, QUICK_TMR_DURATION * 1000);
1077-
#elif PLATFORM_XR809 || PLATFORM_LN882H
1077+
#elif PLATFORM_XR809 || PLATFORM_LN882H || PLATFORM_XR872
10781078

10791079
OS_TimerSetInvalid(&g_quick_timer);
10801080
if (OS_TimerCreate(&g_quick_timer, OS_TIMER_PERIODIC, QuickTick, NULL,

0 commit comments

Comments
 (0)