13 Commits
Author SHA1 Message Date
divadiow 98ddea8d25 define all sensors 2025-08-27 13:39:56 +01:00
divadiow 1a80945308 Update .gitignore 2025-08-27 11:46:21 +01:00
divadiow a9d62026e1 Update README.md 2025-08-27 11:46:14 +01:00
divadiow 5d5488eedd Create txw81x_fpv_v2.5.3.7-36533_2025.8.27_MINI_DV.bin 2025-08-27 11:25:56 +01:00
divadiow 5209331700 Update project_config.h 2025-08-27 11:03:03 +01:00
divadiow 7d032cbf1a Update .gitignore 2025-08-27 10:57:14 +01:00
divadiow 15c2d6c0ae Create Makefile 2025-08-27 10:56:57 +01:00
divadiow ec3a4c4951 Update .gitignore 2025-08-27 10:56:54 +01:00
divadiow 1784e620f8 Update lwipopts.h 2025-08-27 10:42:27 +01:00
divadiow e9c715a2d3 Update project_config.h 2025-08-27 10:36:05 +01:00
divadiow f955bfe251 Update spook_config.h 2025-08-27 10:16:56 +01:00
divadiow bc92943b46 Update tcp.c 2025-08-27 10:10:54 +01:00
divadiow 361b43c4c7 Update main.c 2025-08-27 10:00:59 +01:00
52 changed files with 2502 additions and 2950 deletions
-2
View File
@@ -5,5 +5,3 @@ project/obj/
fpv_app_umac* fpv_app_umac*
cdkws.mk cdkws.mk
project.map project.map
*.o
*.d
-4
View File
@@ -1,4 +0,0 @@
*.bin
*.hex
*.elf
*.bin.xz
Executable → Regular
View File
+2 -2
View File
@@ -27,8 +27,8 @@ fi
cp parameter.bincfg parameter.cfg cp parameter.bincfg parameter.cfg
./BinScript.exe BinScript.BinScript BinScript.exe BinScript.BinScript
./makecode.exe makecode.exe
#crc.exe crc.ini #crc.exe crc.ini
#BinScript.exe BinScript_Bin2Hex.BinScript #BinScript.exe BinScript_Bin2Hex.BinScript
-1495
View File
File diff suppressed because one or more lines are too long
+55 -55
View File
@@ -55,7 +55,7 @@
#include "audio_app/audio_dac.h" #include "audio_app/audio_dac.h"
#include "stream_frame.h" #include "stream_frame.h"
#include "test_demo/test_demo.h" #include "test_demo/test_demo.h"
//#include "atcmd.c" #include "atcmd.c"
#include "keyWork.h" #include "keyWork.h"
#include "flashdisk/flashdisk.h" #include "flashdisk/flashdisk.h"
#include "osal_file.h" #include "osal_file.h"
@@ -944,11 +944,11 @@ __init static void app_network_init()
#endif #endif
//#if SDH_EN && FS_EN && OPENDML_EN #if SDH_EN && FS_EN && OPENDML_EN
// extern void recv_record_Server(int port); extern void recv_record_Server(int port);
// recv_record_Server(43210); recv_record_Server(43210);
//
//#endif #endif
#ifdef CONFIG_UMAC4 #ifdef CONFIG_UMAC4
@@ -1071,27 +1071,27 @@ void hardware_init(uint8 vcam)
//#if LCD_EN #if LCD_EN
//
//
// #if LVGL_STREAM_ENABLE == 1 #if LVGL_STREAM_ENABLE == 1
// uint16_t w,h; uint16_t w,h;
// uint16_t screen_w,screen_h; uint16_t screen_w,screen_h;
// uint8_t rotate,video_rotate; uint8_t rotate,video_rotate;
// extern stream *lvgl_R_osd_stream(const char *name); extern stream *lvgl_R_osd_stream(const char *name);
// extern stream *osd_show_stream(const char *name); extern stream *osd_show_stream(const char *name);
// extern stream *yuv_recv_stream(const char *name); extern stream *yuv_recv_stream(const char *name);
// lcd_hardware_init(&w,&h,&rotate,&screen_w,&screen_h,&video_rotate); lcd_hardware_init(&w,&h,&rotate,&screen_w,&screen_h,&video_rotate);
// lcd_arg_setting(w,h,rotate,screen_w,screen_h,video_rotate); lcd_arg_setting(w,h,rotate,screen_w,screen_h,video_rotate);
// lcd_driver_init((void*)lvgl_R_osd_stream(R_OSD_ENCODE),(void*)osd_show_stream(R_OSD_SHOW),(void*)yuv_recv_stream(R_VIDEO_P1),(void*)yuv_stream(R_VIDEO_P0)); lcd_driver_init((void*)lvgl_R_osd_stream(R_OSD_ENCODE),(void*)osd_show_stream(R_OSD_SHOW),(void*)yuv_recv_stream(R_VIDEO_P1),(void*)yuv_stream(R_VIDEO_P0));
//
// #else #else
// uint16_t w,h; uint16_t w,h;
// uint8_t rotate; uint8_t rotate;
// void lcd_module_run(uint16_t *w,uint16_t *h,uint8_t *rotate); void lcd_module_run(uint16_t *w,uint16_t *h,uint8_t *rotate);
// lcd_module_run(&w,&h,&rotate); lcd_module_run(&w,&h,&rotate);
// #endif #endif
//#endif #endif
#if DVP_EN #if DVP_EN
bool csi_open(); bool csi_open();
@@ -1121,34 +1121,34 @@ void hardware_init(uint8 vcam)
#endif #endif
//#if (USB_EN && RTT_USB_EN) #if (USB_EN && RTT_USB_EN)
// #if (USB_DETECT_EN && !USB_HOST_EN) #if (USB_DETECT_EN && !USB_HOST_EN)
// extern void hg_usb_connect_detect_init(void); extern void hg_usb_connect_detect_init(void);
// hg_usb_connect_detect_init(); hg_usb_connect_detect_init();
// #else #else
// #if USB_HOST_EN #if USB_HOST_EN
// extern rt_err_t hg_usbh_register(rt_uint32_t devid); extern rt_err_t hg_usbh_register(rt_uint32_t devid);
// hg_usbh_register(HG_USB_HOST_CONTROLLER_DEVID); hg_usbh_register(HG_USB_HOST_CONTROLLER_DEVID);
// #else #else
// extern void hg_usbd_class_driver_register(); extern void hg_usbd_class_driver_register();
// extern int hg_usbd_register(rt_uint32_t devid); extern int hg_usbd_register(rt_uint32_t devid);
// hg_usbd_class_driver_register(); hg_usbd_class_driver_register();
// hg_usbd_register(HG_USB_DEV_CONTROLLER_DEVID); hg_usbd_register(HG_USB_DEV_CONTROLLER_DEVID);
// #endif #endif
// #endif #endif
//
//
//#endif
//
//#if (USB_EN && !RTT_USB_EN)
// void hg_usb_test(void);
// hg_usb_test();
//#endif
//#if LCD_EN
// void lvgl_init(uint16_t w,uint16_t h,uint8_t rotate); #endif
// lvgl_init(w,h,rotate);
//#endif #if (USB_EN && !RTT_USB_EN)
void hg_usb_test(void);
hg_usb_test();
#endif
#if LCD_EN
void lvgl_init(uint16_t w,uint16_t h,uint8_t rotate);
lvgl_init(w,h,rotate);
#endif
@@ -1273,7 +1273,7 @@ int main(void)
sys_event_take(SYS_EVENT(SYS_EVENT_NETWORK, 0), sysevt_network_event, 0); sys_event_take(SYS_EVENT(SYS_EVENT_NETWORK, 0), sysevt_network_event, 0);
sys_event_take(SYS_EVENT(SYS_EVENT_LTE, 0), sysevt_lte_event, 0); sys_event_take(SYS_EVENT(SYS_EVENT_LTE, 0), sysevt_lte_event, 0);
sys_event_take(SYS_EVENT(SYS_EVENT_BLE, 0), sysevt_ble_event, 0); sys_event_take(SYS_EVENT(SYS_EVENT_BLE, 0), sysevt_ble_event, 0);
//sys_atcmd_init(); sys_atcmd_init();
sys_wifi_init(); sys_wifi_init();
// enter wifi test mode // enter wifi test mode
if(system_is_wifi_test_mode()) { if(system_is_wifi_test_mode()) {
Executable → Regular
View File
+12
View File
@@ -1,3 +1,15 @@
cd /d %~dp0
set dirname=%1
set dirname=%dirname:~0,-4%
if not exist bakup md bakup
if not exist bakup\%dirname% md bakup\%dirname%
copy .\Obj\*.elf bakup\%dirname%\
copy .\Lst\*.map bakup\%dirname%\
copy makedis.bat bakup\%dirname%\
del /q/f loader.bin del /q/f loader.bin
del /q/f code512.bin del /q/f code512.bin
del /q/f param.bin del /q/f param.bin
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
rm -f Obj/common_common.o rm -f Obj/common_common.o
./psramCFG/lua.exe psramCFG/gen_psram_cfg.lua psramCFG/ psramCFG/lua.exe psramCFG/gen_psram_cfg.lua psramCFG/
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
[ ! -f precompile.exe ] && cp -v ../../../../tools/precompile/Debug/precompile.exe precompile.exe [ ! -f precompile.exe ] && cp -v ../../../../tools/precompile/Debug/precompile.exe precompile.exe
mkdir -p tmp mkdir -p tmp
./precompile.exe ${ProjectPath} $1 precompile.exe ${ProjectPath} $1
exit 0 exit 0
+2312 -5
View File
File diff suppressed because it is too large Load Diff
-9
View File
@@ -1,9 +0,0 @@
memset(ibuf, ff);
read(bin, APP.bin);
def(LEN, v_lx);
remap(c00, 0, LEN);
write(bin, realcode.bin);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+9 -8
View File
@@ -22,8 +22,8 @@
******************************************************************************/ ******************************************************************************/
MEMORY MEMORY
{ {
/* SRAM0 : ORIGIN = 0x20041000 , LENGTH = 0x2c00 */ /*SRAM0 16 - 4KB - 1k*/ SRAM0 : ORIGIN = 0x20041000 , LENGTH = 0x2c00 /*SRAM0 16 - 4KB - 1k*/
SRAM : ORIGIN = 0x20000004 , LENGTH = 0x431fc /* on-chip SRAM 288KB */ SRAM : ORIGIN = 0x20000004 , LENGTH = 0x3fffc /* on-chip SRAM 288KB */
/* SRAM : ORIGIN = 0x38000000 , LENGTH = 0x400000 */ /* SRAM : ORIGIN = 0x38000000 , LENGTH = 0x400000 */
FLASH : ORIGIN = 0x18000000 , LENGTH = 0x200000 FLASH : ORIGIN = 0x18000000 , LENGTH = 0x200000
PSRAM : ORIGIN = 0x38000000 , LENGTH = 0x400000 PSRAM : ORIGIN = 0x38000000 , LENGTH = 0x400000
@@ -31,10 +31,10 @@ MEMORY
__heap_size = 0x11000; __heap_size = 0x11000;
PROVIDE (__ram_end = 0x20043200); PROVIDE (__ram_end = 0x20040000);
PROVIDE (__heap_end = 0x20043200); PROVIDE (__heap_end = 0x20040000);
PROVIDE (__sleep_data_start = 0x20043200); PROVIDE (__sleep_data_start = 0x20040004);
PROVIDE (__sleep_data_stop = 0x20043bfc); PROVIDE (__sleep_data_stop = 0x20040a00);
PROVIDE (__psram_heap_end = 0x38400000); PROVIDE (__psram_heap_end = 0x38400000);
REGION_ALIAS("REGION_TEXT", FLASH); REGION_ALIAS("REGION_TEXT", FLASH);
@@ -47,7 +47,7 @@ REGION_ALIAS("REGION_NOLOAD_PSRAM", PSRAM);
REGION_ALIAS("REGION_DATA2", SRAM); REGION_ALIAS("REGION_DATA2", SRAM);
REGION_ALIAS("REGION_OTA_VMA", SRAM); REGION_ALIAS("REGION_OTA_VMA", SRAM);
REGION_ALIAS("REGION_TEXT2", SRAM); REGION_ALIAS("REGION_TEXT2", SRAM);
REGION_ALIAS("REGION_DSLEEP", SRAM); REGION_ALIAS("REGION_DSLEEP", SRAM0);
ENTRY(Reset_Handler) ENTRY(Reset_Handler)
SECTIONS SECTIONS
@@ -293,4 +293,5 @@ SECTIONS
/* ASSERT(DEFINED(ROM_FUNC_ENABLE), "please disable ROM Functions in ld file") */ /* ASSERT(DEFINED(ROM_FUNC_ENABLE), "please disable ROM Functions in ld file") */
/* ASSERT(ADDR(.text) < 0x20000068, "ROM Functions data area conflict!!!")*/ /* ASSERT(ADDR(.text) < 0x20000068, "ROM Functions data area conflict!!!")*/
INPUT(utilities/romcode.ld) INPUT(romcode.ld)
+1 -1
View File
@@ -85,7 +85,7 @@ void prc_finish(void *d)
{ {
struct prc_pixel *pixel_prc = (struct prc_pixel*)d; struct prc_pixel *pixel_prc = (struct prc_pixel*)d;
pixel_prc->hardward_ready = 1; pixel_prc->hardward_ready = 1;
//_os_printf("$"); _os_printf("$");
} }
+1 -1
View File
@@ -58,7 +58,7 @@ static void *start_block(void)
static void get_back_audio_frame( struct frame *f, void *d ) static void get_back_audio_frame( struct frame *f, void *d )
{ {
struct audio_encoder *en = (struct audio_encoder *)d; struct audio_encoder *en = (struct audio_encoder *)d;
//_os_printf("-"); _os_printf("-");
//exchange_frame( en->ex, new_frame() ); //exchange_frame( en->ex, new_frame() );
deliver_frame_to_stream( f, en->output ); deliver_frame_to_stream( f, en->output );
} }
+1 -1
View File
@@ -16,7 +16,7 @@
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "list.h" #include "list.h"
#include "lib/net/eloop/eloop.h" #include "lib/net/eloop/eloop.h"
+4 -4
View File
@@ -263,7 +263,7 @@ void spook_send_thread_stream(struct rtsp_priv *r)
audio_f = GET_FRAME(audio_s); audio_f = GET_FRAME(audio_s);
if(audio_f) if(audio_f)
{ {
//_os_printf("A"); _os_printf("A");
audio = audio_ex->jf;//ex->slave_cur->f; audio = audio_ex->jf;//ex->slave_cur->f;
audio->get_f = audio_f; audio->get_f = audio_f;
audio->length = GET_DATA_LEN(audio_f); audio->length = GET_DATA_LEN(audio_f);
@@ -299,7 +299,7 @@ void spook_send_thread_stream(struct rtsp_priv *r)
if((os_jiffies() - time_for_count) > 1000){ if((os_jiffies() - time_for_count) > 1000){
time_for_count = os_jiffies(); time_for_count = os_jiffies();
//_os_printf("cnt_num:%d\r\n",cnt_num); _os_printf("cnt_num:%d\r\n",cnt_num);
cnt_num = 0; cnt_num = 0;
} }
jpeg->length = GET_DATA_LEN(get_f);; jpeg->length = GET_DATA_LEN(get_f);;
@@ -314,7 +314,7 @@ void spook_send_thread_stream(struct rtsp_priv *r)
* callback: get_back_frame( struct frame *f, void *d ) * callback: get_back_frame( struct frame *f, void *d )
* d: (jpeg_encoder *)en * d: (jpeg_encoder *)en
*/ */
//_os_printf("#"); _os_printf("#");
//_os_printf("ex:%X\tf:%X\n",ex,ex->f); //_os_printf("ex:%X\tf:%X\n",ex,ex->f);
ex->f( jpeg, ex->d ); ex->f( jpeg, ex->d );
} }
@@ -325,7 +325,7 @@ void spook_send_thread_stream(struct rtsp_priv *r)
count_times++; count_times++;
if(count_times>25) if(count_times>25)
{ {
//_os_printf("time:%lld\n",csi_kernel_get_ticks()-time); _os_printf("time:%lld\n",csi_kernel_get_ticks()-time);
count_times = 0; count_times = 0;
time = csi_kernel_get_ticks(); time = csi_kernel_get_ticks();
} }
+5 -5
View File
@@ -1,8 +1,8 @@
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include "rtsp_common.h" #include "rtsp_common.h"
#include "osal/string.h" #include "osal/string.h"
+6 -6
View File
@@ -18,12 +18,12 @@
#include <stdio.h> #include <stdio.h>
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include <event.h> #include <event.h>
#include <log.h> #include <log.h>
@@ -72,7 +72,7 @@ static int audio_get_sdp( char *dest, int len, int payload, int port, void *d )
static int audio_process_frame( struct frame *f, void *d ) static int audio_process_frame( struct frame *f, void *d )
{ {
//_os_printf("+"); _os_printf("+");
struct rtp_media *rtp = (struct rtp_media *)d; struct rtp_media *rtp = (struct rtp_media *)d;
struct rtp_audio *out = (struct rtp_audio *)rtp->private; struct rtp_audio *out = (struct rtp_audio *)rtp->private;
out->f = f; out->f = f;
+6 -6
View File
@@ -18,12 +18,12 @@
#include <stdio.h> #include <stdio.h>
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include <event.h> #include <event.h>
#include <log.h> #include <log.h>
@@ -857,7 +857,7 @@ int fd_send_data(int fd,unsigned char *sendbuf,int sendLen,int times)
} }
if(size<0) if(size<0)
{ {
//_os_printf("%s err size:%d\n",__FUNCTION__,size); _os_printf("%s err size:%d\n",__FUNCTION__,size);
return -1; return -1;
} }
+6 -6
View File
@@ -16,12 +16,12 @@
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdio.h> #include <stdio.h>
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
//#include "lwip/fcntl.h" //#include "lwip\fcntl.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include <event.h> #include <event.h>
#include <log.h> #include <log.h>
+5 -5
View File
@@ -19,13 +19,13 @@
#include <stdio.h> #include <stdio.h>
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include <event.h> #include <event.h>
#include <log.h> #include <log.h>
+5 -5
View File
@@ -1,9 +1,9 @@
#include <stdio.h> #include <stdio.h>
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include "log.h" #include "log.h"
#include "sys_config.h" #include "sys_config.h"
#include "osal/string.h" #include "osal/string.h"
+5 -5
View File
@@ -19,12 +19,12 @@
#include <stdio.h> #include <stdio.h>
//#include "sys_config.h" //#include "sys_config.h"
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include <event.h> #include <event.h>
#include <log.h> #include <log.h>
+5 -5
View File
@@ -17,13 +17,13 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include <event.h> #include <event.h>
#include <log.h> #include <log.h>
+5 -5
View File
@@ -18,11 +18,11 @@
#include <stdio.h> #include <stdio.h>
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
//#include "lwip/fcntl.h" //#include "lwip\fcntl.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "typesdef.h" #include "typesdef.h"
//#include <linux/linux_mutex.h> //#include <linux/linux_mutex.h>
+5 -5
View File
@@ -1,8 +1,8 @@
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include "rtsp_common.h" #include "rtsp_common.h"
#include "osal/string.h" #include "osal/string.h"
+1 -1
View File
@@ -522,7 +522,7 @@ static int opcode_func(stream *s,void *priv,int opcode)
if(data->data) if(data->data)
{ {
//因为是转发,所以这里移除的话是交给原来的方法移除 //因为是转发,所以这里移除的话是交给原来的方法移除
//_os_printf("$"); _os_printf("$");
free_data(data->data); free_data(data->data);
data->data = NULL; data->data = NULL;
} }
+1 -1
View File
@@ -499,7 +499,7 @@ static int opcode_func(stream *s,void *priv,int opcode)
if(data->data) if(data->data)
{ {
//因为是转发,所以这里移除的话是交给原来的方法移除 //因为是转发,所以这里移除的话是交给原来的方法移除
//_os_printf("$"); _os_printf("$");
free_data(data->data); free_data(data->data);
data->data = NULL; data->data = NULL;
} }
+6 -6
View File
@@ -1,11 +1,11 @@
#include <stdio.h> #include <stdio.h>
#include "tx_platform.h" #include "tx_platform.h"
#include "lwip/sockets.h" #include "lwip\sockets.h"
#include "lwip/netif.h" #include "lwip\netif.h"
#include "lwip/dns.h" #include "lwip\dns.h"
//#include "lwip/fcntl.h" //#include "lwip\fcntl.h"
#include "lwip/api.h" #include "lwip\api.h"
#include "lwip/tcp.h" #include "lwip\tcp.h"
#include <event.h> #include <event.h>
#include <log.h> #include <log.h>
+1 -1
View File
@@ -655,7 +655,7 @@ static void jpeg_in_sram(struct os_work *work,struct list_head *get_f)
j->malloc_mem = dest_list; j->malloc_mem = dest_list;
del_jpeg_frame(get_f); del_jpeg_frame(get_f);
//统一发送数据,这个时候,其他流才有可能获取到数据 //统一发送数据,这个时候,其他流才有可能获取到数据
//_os_printf("$"); _os_printf("$");
send_data_to_stream(data_s); send_data_to_stream(data_s);
} }
} }
+1 -1
View File
@@ -675,7 +675,7 @@ void jpeg_in_sram(struct list_head *get_f)
j->malloc_mem = dest_list; j->malloc_mem = dest_list;
del_jpeg_frame(get_f); del_jpeg_frame(get_f);
//统一发送数据,这个时候,其他流才有可能获取到数据 //统一发送数据,这个时候,其他流才有可能获取到数据
//_os_printf("$"); _os_printf("$");
send_data_to_stream(data_s); send_data_to_stream(data_s);
} }
} }
+8 -10
View File
@@ -31,8 +31,6 @@
__weak void user_pin_func(int dev_id, int request) {}; __weak void user_pin_func(int dev_id, int request) {};
extern int dvp_scl;
extern int dvp_sda;
void gpio_iomap_output_iomask(uint32 io_func) void gpio_iomap_output_iomask(uint32 io_func)
@@ -686,15 +684,15 @@ static int iic_pin_func(int dev_id, int request)
break; break;
case HG_I2C2_DEVID: case HG_I2C2_DEVID:
if (request) { if (request) {
gpio_iomap_inout(dvp_scl, GPIO_IOMAP_IN_SPI2_SCK_IN, GPIO_IOMAP_OUT_SPI2_SCK_OUT); gpio_iomap_inout(PIN_IIC2_SCL, GPIO_IOMAP_IN_SPI2_SCK_IN, GPIO_IOMAP_OUT_SPI2_SCK_OUT);
gpio_iomap_inout(dvp_sda, GPIO_IOMAP_IN_SPI2_IO0_IN, GPIO_IOMAP_OUT_SPI2_IO0_OUT); gpio_iomap_inout(PIN_IIC2_SDA, GPIO_IOMAP_IN_SPI2_IO0_IN, GPIO_IOMAP_OUT_SPI2_IO0_OUT);
gpio_driver_strength(dvp_scl, GPIO_DS_28MA); gpio_driver_strength(PIN_IIC2_SCL, GPIO_DS_28MA);
gpio_driver_strength(dvp_sda, GPIO_DS_28MA); gpio_driver_strength(PIN_IIC2_SDA, GPIO_DS_28MA);
gpio_set_mode(dvp_scl, GPIO_OPENDRAIN_PULL_UP, GPIO_PULL_LEVEL_4_7K); gpio_set_mode(PIN_IIC2_SCL, GPIO_OPENDRAIN_PULL_UP, GPIO_PULL_LEVEL_4_7K);
gpio_set_mode(dvp_sda, GPIO_OPENDRAIN_PULL_UP, GPIO_PULL_LEVEL_4_7K); gpio_set_mode(PIN_IIC2_SDA, GPIO_OPENDRAIN_PULL_UP, GPIO_PULL_LEVEL_4_7K);
} else { } else {
gpio_set_dir(dvp_scl, GPIO_DIR_INPUT); gpio_set_dir(PIN_IIC2_SCL, GPIO_DIR_INPUT);
gpio_set_dir(dvp_sda, GPIO_DIR_INPUT); gpio_set_dir(PIN_IIC2_SDA, GPIO_DIR_INPUT);
} }
break; break;
default: default:
+4 -4
View File
@@ -167,18 +167,18 @@ extern void hw_memcpy(void *dest, const void *src, unsigned int size);
// One tcp_pcb_listen is needed for each TCPServer. // One tcp_pcb_listen is needed for each TCPServer.
// Each requires 72 bytes of RAM. // Each requires 72 bytes of RAM.
#ifndef MEMP_NUM_TCP_PCB_LISTEN #ifndef MEMP_NUM_TCP_PCB_LISTEN
#define MEMP_NUM_TCP_PCB_LISTEN 6 #define MEMP_NUM_TCP_PCB_LISTEN 4
#endif #endif
// One is tcp_pcb needed for each TCPSocket. // One is tcp_pcb needed for each TCPSocket.
// Each requires 196 bytes of RAM. // Each requires 196 bytes of RAM.
#ifndef MEMP_NUM_TCP_PCB #ifndef MEMP_NUM_TCP_PCB
#define MEMP_NUM_TCP_PCB 20 #define MEMP_NUM_TCP_PCB 12
#endif #endif
// One udp_pcb is needed for each UDPSocket. // One udp_pcb is needed for each UDPSocket.
// Each requires 84 bytes of RAM (total rounded to multiple of 512). // Each requires 84 bytes of RAM (total rounded to multiple of 512).
#ifndef MEMP_NUM_UDP_PCB #ifndef MEMP_NUM_UDP_PCB
#define MEMP_NUM_UDP_PCB 4 #define MEMP_NUM_UDP_PCB 8
#endif #endif
// Number of non-pool pbufs. // Number of non-pool pbufs.
@@ -296,7 +296,7 @@ extern void hw_memcpy(void *dest, const void *src, unsigned int size);
// One netconn is needed for each UDPSocket, TCPSocket or TCPServer. // One netconn is needed for each UDPSocket, TCPSocket or TCPServer.
// Each requires 236 bytes of RAM (total rounded to multiple of 512). // Each requires 236 bytes of RAM (total rounded to multiple of 512).
#ifndef MEMP_NUM_NETCONN #ifndef MEMP_NUM_NETCONN
#define MEMP_NUM_NETCONN 20 #define MEMP_NUM_NETCONN 12
#endif #endif
/** /**
+1 -26
View File
@@ -302,21 +302,11 @@ void vpp_put_psram(uint32 yuvbuf_addr,uint32 s_w,uint32 s_h);
#define DEV_SENSOR_BF30A2 (0||CMOS_AUTO_LOAD) #define DEV_SENSOR_BF30A2 (0||CMOS_AUTO_LOAD)
#endif #endif
#ifndef DEV_SENSOR_IOT101 #ifndef DEV_SENSOR_IOT101
#define DEV_SENSOR_IOT101 0 #define DEV_SENSOR_IOT101 0
#endif #endif
#ifndef DEV_SENSOR_HI704
#define DEV_SENSOR_HI704 (0||CMOS_AUTO_LOAD)
#endif
#ifndef DEV_SENSOR_SP0828
#define DEV_SENSOR_SP0828 (0||CMOS_AUTO_LOAD)
#endif
#ifndef DEV_SENSOR_SP0A20
#define DEV_SENSOR_SP0A20 (0||CMOS_AUTO_LOAD)
#endif
#if DEV_SENSOR_OV7725 #if DEV_SENSOR_OV7725
extern const _Sensor_Ident_ ov7725_init; extern const _Sensor_Ident_ ov7725_init;
@@ -445,19 +435,4 @@ extern const _Sensor_Ident_ sc101iot_init;
extern SENSOR_OP_SECTION const _Sensor_Adpt_ sc101iot_cmd; extern SENSOR_OP_SECTION const _Sensor_Adpt_ sc101iot_cmd;
#endif #endif
#if DEV_SENSOR_HI704
extern const _Sensor_Ident_ hi704_init;
extern SENSOR_OP_SECTION const _Sensor_Adpt_ hi704_cmd;
#endif
#if DEV_SENSOR_SP0828
extern const _Sensor_Ident_ sp0828_init;
extern SENSOR_OP_SECTION const _Sensor_Adpt_ sp0828_cmd;
#endif
#if DEV_SENSOR_SP0A20
extern const _Sensor_Ident_ sp0a20_init;
extern SENSOR_OP_SECTION const _Sensor_Adpt_ sp0a20_cmd;
#endif
#endif #endif
+1 -4
View File
@@ -89,10 +89,7 @@ extern "C" {
#define os_strcpy(d,s) strcpy((char *)(d), (const char *)(s)) #define os_strcpy(d,s) strcpy((char *)(d), (const char *)(s))
#define os_strncpy(d,s,n) strncpy((char *)(d), (const char *)(s), n) #define os_strncpy(d,s,n) strncpy((char *)(d), (const char *)(s), n)
#define os_memset(s,c,n) memset((void *)(s), c, n) #define os_memset(s,c,n) memset((void *)(s), c, n)
//#define os_memcpy(d,s,n) memcpy((void *)(d), (const void *)(s), n) #define os_memcpy(d,s,n) memcpy((void *)(d), (const void *)(s), n)
#define MEMCPYS memcpy
#define os_memcpy(d, s, n) MEMCPYS((d), (s), (n))
//#define os_memcpy memcpy
#define os_memmove(d,s,n) memmove((void *)(d), (const void *)(s), n) #define os_memmove(d,s,n) memmove((void *)(d), (const void *)(s), n)
#define os_sprintf(s, ...) sprintf((char *)(s), __VA_ARGS__) #define os_sprintf(s, ...) sprintf((char *)(s), __VA_ARGS__)
#define os_vsnprintf vsnprintf #define os_vsnprintf vsnprintf
-391
View File
@@ -1,391 +0,0 @@
#include "sys_config.h"
#include "typesdef.h"
#include "lib/video/dvp/cmos_sensor/csi.h"
#include "tx_platform.h"
#include "list.h"
#include "dev.h"
#include "hal/i2c.h"
#if DEV_SENSOR_HI704
SENSOR_INIT_SECTION static const unsigned char HI704InitTable[CMOS_INIT_LEN]=
{
0x03,0x00,
0x01,0xf1,
0x01,0xf3,
0x01,0xf1,
0x03,0x00,
0x10,0x08,
0x11,0x90,
0x12,0x04,
0x20,0x00,
0x21,0x04,
0x22,0x00,
0x23,0x04,
0x40,0x01,
0x41,0x58,
0x42,0x00,
0x43,0x64,
0x45,0x01,
0x46,0x08,
0x47,0xf5,
0x80,0x2e,
0x81,0x7e,
0x82,0x90,
0x83,0x30,
0x84,0x2c,
0x85,0x4b,
0x89,0x48,
0x90,0x0c,
0x91,0x0c,
0x92,0x48,
0x93,0x40,
0x98,0x38,
0x99,0x40,
0xa0,0x00,
0xa8,0x40,
0x03,0x02,
0x13,0x40,
0x14,0x04,
0x1a,0x00,
0x1b,0x08,
0x20,0x33,
0x21,0xaa,
0x22,0xa7,
0x23,0x32,
0x3b,0x48,
0x50,0x21,
0x52,0xa2,
0x53,0x0a,
0x54,0x30,
0x55,0x10,
0x56,0x0c,
0x59,0x0f,
0x60,0xca,
0x61,0xdb,
0x62,0xca,
0x63,0xda,
0x64,0xca,
0x65,0xda,
0x72,0xcb,
0x73,0xd8,
0x74,0xcb,
0x75,0xd8,
0x80,0x02,
0x81,0xbd,
0x82,0x24,
0x83,0x3e,
0x84,0x24,
0x85,0x3e,
0x92,0x72,
0x93,0x8c,
0x94,0x72,
0x95,0x8c,
0xa0,0x03,
0xa1,0xbb,
0xa4,0xbb,
0xa5,0x03,
0xa8,0x44,
0xa9,0x6a,
0xaa,0x92,
0xab,0xb7,
0xb8,0xc9,
0xb9,0xd0,
0xbc,0x20,
0xbd,0x28,
0xc0,0xde,
0xc1,0xec,
0xc2,0xde,
0xc3,0xec,
0xc4,0xe0,
0xc5,0xea,
0xc6,0xe0,
0xc7,0xea,
0xc8,0xe1,
0xc9,0xe8,
0xca,0xe1,
0xcb,0xe8,
0xcc,0xe2,
0xcd,0xe7,
0xce,0xe2,
0xcf,0xe7,
0xd0,0xc8,
0xd1,0xef,
0x03,0x10,
0x10,0x03,
0x11,0x43,
0x40,0x80,
0x41,0x00,
0x48,0x90,
0x50,0x48,
0x60,0x7f,
0x61,0x00,
0x62,0x9a,
0x63,0x90,
0x64,0x48,
0x66,0x90,
0x67,0x9e,
0x03,0x11,
0x10,0x25,
0x11,0x1f,
0x20,0x00,
0x21,0x38,
0x23,0x0a,
0x60,0x10,
0x61,0x82,
0x62,0x00,
0x63,0x83,
0x64,0x83,
0x67,0xf0,
0x68,0x30,
0x69,0x10,
0x03,0x12,
0x40,0xe9,
0x41,0x09,
0x50,0x18,
0x51,0x24,
0x70,0x1f,
0x71,0x00,
0x72,0x00,
0x73,0x00,
0x74,0x10,
0x75,0x10,
0x76,0x20,
0x77,0x80,
0x78,0x88,
0x79,0x18,
0xb0,0x7d,
0x03,0x13,
0x10,0x01,
0x11,0x89,
0x12,0x14,
0x13,0x19,
0x14,0x08,
0x20,0x04,
0x21,0x04,
0x23,0x30,
0x24,0x33,
0x25,0x08,
0x26,0x18,
0x27,0x00,
0x28,0x08,
0x29,0x90,
0x2a,0xe0,
0x2b,0x10,
0x2c,0x28,
0x2d,0x40,
0x2e,0x00,
0x2f,0x00,
0x30,0x11,
0x80,0x03,
0x81,0x07,
0x90,0x04,
0x91,0x04,
0x92,0x00,
0x93,0x20,
0x94,0x42,
0x95,0x60,
0x03,0x14,
0x10,0x01,
0x20,0x60,
0x21,0x80,
0x22,0x66,
0x23,0x50,
0x24,0x44,
0x03,0x15,
0x10,0x03,
0x14,0x3c,
0x16,0x2c,
0x17,0x2f,
0x30,0xcb,
0x31,0x61,
0x32,0x16,
0x33,0x23,
0x34,0xce,
0x35,0x2b,
0x36,0x01,
0x37,0x34,
0x38,0x75,
0x40,0x87,
0x41,0x18,
0x42,0x91,
0x43,0x94,
0x44,0x9f,
0x45,0x33,
0x46,0x00,
0x47,0x94,
0x48,0x14,
0x03,0x16,
0x30,0x00,
0x31,0x0a,
0x32,0x1b,
0x33,0x2e,
0x34,0x5c,
0x35,0x79,
0x36,0x97,
0x37,0xa7,
0x38,0xb5,
0x39,0xc3,
0x3a,0xcf,
0x3b,0xe1,
0x3c,0xf2,
0x3d,0xff,
0x3e,0xff,
0x03,0x17,
0xc4,0x3c,
0xc5,0x32,
0x03,0x20,
0x10,0x0c,
0x11,0x04,
0x20,0x01,
0x28,0x27,
0x29,0xa1,
0x2a,0xf0,
0x2b,0x34,
0x2c,0x2b,
0x30,0x78,
0x39,0x22,
0x3a,0xde,
0x3b,0x22,
0x3c,0xde,
0x60,0x95,
0x68,0x3c,
0x69,0x64,
0x6a,0x28,
0x6b,0xc8,
0x70,0x4a,
0x76,0x22,
0x77,0x02,
0x78,0x12,
0x79,0x27,
0x7a,0x23,
0x7c,0x1d,
0x7d,0x22,
0x83,0x00,
0x84,0xaf,
0x85,0xc8,
0x86,0x00,
0x87,0xfa,
0x88,0x02,
0x89,0xbf,
0x8a,0x20,
0x8b,0x3a,
0x8c,0x98,
0x8d,0x30,
0x8e,0xd4,
0x91,0x04,
0x92,0x91,
0x93,0xec,
0x94,0x01,
0x95,0xb7,
0x96,0x74,
0x98,0x8c,
0x99,0x23,
0x9c,0x06,
0x9d,0xd6,
0x9e,0x00,
0x9f,0xfa,
0xb1,0x14,
0xb2,0x50,
0xb4,0x14,
0xb5,0x38,
0xb6,0x26,
0xb7,0x20,
0xb8,0x1d,
0xb9,0x1b,
0xba,0x1a,
0xbb,0x19,
0xbc,0x19,
0xbd,0x18,
0xc0,0x1a,
0xc3,0x48,
0xc4,0x48,
0x03,0x22,
0x10,0xe2,
0x11,0x26,
0x20,0x34,
0x21,0x40,
0x30,0x80,
0x31,0x80,
0x38,0x12,
0x39,0x33,
0x40,0xf0,
0x41,0x55,
0x42,0x33,
0x43,0xf3,
0x44,0x88,
0x45,0x66,
0x46,0x02,
0x03,0x22,
0x10,0x6a,
0x80,0x38,
0x81,0x20,
0x82,0x30,
0x83,0x36,
0x84,0x30,
0x85,0x50,
0x86,0x44,
0x87,0x4d,
0x88,0x38,
0x89,0x3e,
0x8a,0x29,
0x8b,0x02,
0x8d,0x22,
0x8e,0x71,
0x8f,0x63,
0x90,0x60,
0x91,0x5c,
0x92,0x56,
0x93,0x52,
0x94,0x4c,
0x95,0x36,
0x96,0x31,
0x97,0x2e,
0x98,0x2a,
0x99,0x29,
0x9a,0x26,
0x9b,0x09,
0x03,0x22,
0x10,0xfb,
0x03,0x20,
0x10,0x9c,
0x03,0x22,
0x10,0x6a,
0x80,0x48,
0x81,0x20,
0x82,0x40,
0x83,0x58,
0x84,0x10,
0x85,0x70,
0x86,0x10,
0x10,0xea,
0x03,0x00,
0x01,0xf0,
0xff,0xff,
};
SENSOR_OP_SECTION const _Sensor_Adpt_ hi704_cmd=
{
.typ = 1, //YUV
.pixelw = 640,
.pixelh= 480,
.hsyn = 1,
.vsyn = 1,
.rduline = 0,
.rawwide = 1,//10bit
.colrarray = 2,//0:_RGRG_ 1:_GRGR_,2:_BGBG_,3:_GBGB_
.init = (uint8 *)HI704InitTable,
.rotate_adapt = {0},
.hvb_adapt = {0},
.mclk = 24000000,
.p_fun_adapt = {NULL,NULL,NULL},
.p_xc7016_adapt = {NULL},
};
const _Sensor_Ident_ hi704_init=
{
//id, w_cmd, r_cmd, addr_num, data_num, id_reg
0x96,0x60,0x61,0x01,0x01,0x04
};
#endif
-280
View File
@@ -1,280 +0,0 @@
#include "sys_config.h"
#include "typesdef.h"
#include "lib/video/dvp/cmos_sensor/csi.h"
#include "tx_platform.h"
#include "list.h"
#include "dev.h"
#include "hal/i2c.h"
#if DEV_SENSOR_SP0828
SENSOR_INIT_SECTION static const unsigned char SP0828InitTable[CMOS_INIT_LEN]=
{
0xfd,0x00,
0x1c,0x00,
0x30,0x00,
0x0f,0x2f,
0x10,0x2f,
0x12,0x7f,
0x13,0x2f,
0x15,0x7f,
0x16,0x0f,
0x22,0xe0,
0x26,0x08,
0x27,0xe8,
0x28,0x0b,
0x32,0x00,
0xfd,0x00,
0x31,0x10,
0xd8,0x58,
0xd9,0x58,
0xda,0x58,
0xdb,0x58,
0x36,0x00,
0x5f,0x11,
0xe0,0x00,
0xe1,0xdc,
0xe2,0xb0,
0xe3,0x00,
0xe4,0x2e,
0xe5,0x00,
0xe6,0x2b,
0xb7,0x3c,
0xb8,0x50,
0xfd,0x01,
0x25,0x1a,
0x26,0xfb,
0x28,0x61,
0x29,0x49,
0x31,0x64,
0x32,0x18,
0x4d,0xdc,
0x4e,0x53,
0x41,0x8c,
0x42,0x57,
0x55,0xff,
0x56,0x00,
0x59,0x82,
0x5a,0x00,
0x5d,0xff,
0x5e,0x6f,
0x57,0xff,
0x58,0x00,
0x5b,0xff,
0x5c,0xa8,
0x5f,0x75,
0x60,0x00,
0x2d,0x00,
0x2e,0x00,
0x2f,0x00,
0x30,0x00,
0x33,0x00,
0x34,0x00,
0x37,0x00,
0x38,0x00,
0x39,0x01,
0x3a,0x07,
0xfd,0x00,
0x33,0x0f,
0x51,0x3f,
0x52,0x09,
0x53,0x00,
0x54,0x00,
0x55,0x10,
0x4f,0x08,
0x50,0x08,
0x56,0x70,
0x57,0x10,
0x58,0x10,
0x59,0x10,
0x5a,0x02,
0x5b,0x02,
0x5c,0x20,
0x65,0x03,
0x66,0x01,
0x67,0x03,
0x68,0x46,
0x69,0x7f,
0x6a,0x01,
0x6b,0x04,
0x6c,0x01,
0x6d,0x03,
0x6e,0x46,
0x6f,0x7f,
0x70,0x01,
0x71,0x05,
0x72,0x01,
0x73,0x03,
0x74,0x46,
0x75,0x7f,
0x76,0x01,
0x7f,0xa0,
0x80,0x00,
0x81,0xe0,
0x82,0xed,
0x83,0xa6,
0x84,0xed,
0x85,0xfa,
0x86,0xba,
0x87,0xcc,
0x88,0x30,
0x89,0x33,
0x8a,0x0f,
0x8b,0x00,
0x8c,0x1a,
0x8d,0x29,
0x8e,0x41,
0x8f,0x62,
0x90,0x7c,
0x91,0x90,
0x92,0xa2,
0x93,0xaf,
0x94,0xba,
0x95,0xc4,
0x96,0xce,
0x97,0xd6,
0x98,0xdd,
0x99,0xe4,
0x9a,0xea,
0x9b,0xf1,
0xfd,0x01,
0x8d,0xf8,
0x8e,0xff,
0xfd,0x00,
0xca,0xcf,
0xcb,0x07,
0xcc,0x04,
0xce,0xff,
0xcf,0x10,
0xd0,0x20,
0xd1,0x00,
0xd2,0x1c,
0xd3,0x16,
0xd4,0x00,
0xd6,0x1c,
0xd7,0x16,
0xdd,0x6c,
0xde,0xa0,
0xb9,0x00,
0xba,0x04,
0xbb,0x08,
0xbc,0x10,
0xbd,0x20,
0xbe,0x30,
0xbf,0x40,
0xc0,0x50,
0xc1,0x60,
0xc2,0x70,
0xc3,0x80,
0xc4,0x90,
0xc5,0xa0,
0xc6,0xb0,
0xc7,0xc0,
0xc8,0xd0,
0xc9,0xe0,
0xfd,0x01,
0x89,0xf0,
0x8a,0xff,
0xfd,0x00,
0xe8,0x30,
0xe9,0x30,
0xea,0x40,
0xf4,0x1b,
0xf5,0x97,
0xec,0x53,
0xed,0x78,
0xee,0x47,
0xef,0x6c,
0xf7,0x70,
0xf8,0x5b,
0xf9,0x64,
0xfa,0x4f,
0xfd,0x01,
0x09,0x31,
0x0a,0x85,
0x0b,0x0b,
0x14,0x20,
0x15,0x0f,
0xfd,0x00,
0x05,0x00,
0x06,0xfe,
0x09,0x02,
0x0a,0x4d,
0xf0,0x47,
0xf1,0x00,
0xf2,0x59,
0xf5,0x72,
0xfd,0x01,
0x00,0xac,
0x0f,0x5a,
0x16,0x5a,
0x17,0x9c,
0x18,0xa4,
0x1b,0x5a,
0x1c,0xa4,
0xb4,0x21,
0xb5,0x3b,
0xb6,0x43,
0xb9,0x40,
0xba,0x4f,
0xbb,0x47,
0xbc,0x45,
0xbd,0x43,
0xbe,0x42,
0xbf,0x42,
0xc0,0x42,
0xc1,0x41,
0xc2,0x41,
0xc3,0x41,
0xc4,0x41,
0xc5,0x70,
0xc6,0x41,
0xca,0x70,
0xcb,0x0c,
0xfd,0x00,
0xfd,0x00,
0x31,0x10,
0x32,0x15,
0x34,0x66,
0x35,0x40,
0x1b,0x07,
0xff,0xff,
};
//Sensor prewrite sequence
SENSOR_INIT_SECTION static const unsigned char SP0828prewriteInitTable[CMOS_INIT_LEN]=
{
0xfd,0x00,
0x1c,0x00,
0x30,0x00,
0x31,0x00,
0xff,0xff,
};
SENSOR_OP_SECTION const _Sensor_Adpt_ sp0828_cmd=
{
.typ = 1, //YUV
.pixelw = 240,
.pixelh= 320,
.hsyn = 1,
.vsyn = 1,
.rduline = 0,
.rawwide = 1,//10bit
.colrarray = 2,//0:_RGRG_ 1:_GRGR_,2:_BGBG_,3:_GBGB_
.init = (uint8 *)SP0828InitTable,
.preset = (uint8 *)SP0828prewriteInitTable,
.rotate_adapt = {0},
.hvb_adapt = {0x80,0x0a,0x80,0x0a},
.mclk = 24000000,
.p_fun_adapt = {NULL,NULL,NULL},
.p_xc7016_adapt = {NULL},
};
const _Sensor_Ident_ sp0828_init=
{
//id, w_cmd, r_cmd, addr_num, data_num, id_reg
0x0c,0x30,0x31,0x01,0x01,0x02
};
#endif
-401
View File
@@ -1,401 +0,0 @@
#include "sys_config.h"
#include "typesdef.h"
#include "lib/video/dvp/cmos_sensor/csi.h"
#include "tx_platform.h"
#include "list.h"
#include "dev.h"
#include "hal/i2c.h"
#if DEV_SENSOR_SP0A20
SENSOR_INIT_SECTION static const unsigned char SP0A20InitTable[CMOS_INIT_LEN]=
{
0xfd,0x00,
0x1d,0x1f,
0x0c,0x01,
0x1b,0x27,
0x12,0x02,
0x13,0x2f,
0x6d,0x32,
0x6c,0x32,
0x6f,0x33,
0x6e,0x34,
0x16,0x38,
0x17,0x38,
0x70,0x3a,
0x14,0x02,
0x15,0x20,
0x71,0x23,
0x69,0x25,
0x6a,0x1a,
0x72,0x1c,
0x75,0x1e,
0x73,0x3c,
0x74,0x21,
0x79,0x00,
0x77,0x10,
0x1a,0x4d,
0x1c,0x07,
0x1e,0x15,
0x21,0x08,
0x22,0x28,
0x26,0x66,
0x28,0x0b,
0x37,0x7a,
0xfd,0x02,
0x01,0x80,
0x52,0x10,
0x54,0x00,
0xfd,0x01,
0x41,0x00,
0x42,0x00,
0x43,0x00,
0x44,0x00,
0xfd,0x00,
0x03,0x01,
0x04,0xc2,
0x05,0x00,
0x06,0x00,
0x07,0x00,
0x08,0x00,
0x09,0x02,
0x0a,0xf4,
0xfd,0x01,
0xf0,0x00,
0xf7,0x4b,
0x02,0x0e,
0x03,0x01,
0x06,0x4b,
0x07,0x00,
0x08,0x01,
0x09,0x00,
0xfd,0x02,
0xbe,0x1a,
0xbf,0x04,
0xd0,0x1a,
0xd1,0x04,
0xfd,0x01,
0x5a,0x40,
0xfd,0x02,
0xbc,0x70,
0xbd,0x50,
0xb8,0x66,
0xb9,0x88,
0xba,0x30,
0xbb,0x45,
0xfd,0x01,
0xe0,0x7c,
0xe1,0x60,
0xe2,0x54,
0xe3,0x4c,
0xe4,0x4c,
0xe5,0x48,
0xe6,0x48,
0xe7,0x44,
0xe8,0x44,
0xe9,0x44,
0xea,0x40,
0xf3,0x40,
0xf4,0x40,
0xfd,0x01,
0x04,0xc8,
0x05,0x40,
0x0a,0xc8,
0x0b,0x40,
0xfd,0x01,
0xeb,0x80,
0xec,0x68,
0xed,0x05,
0xee,0x0c,
0xfd,0x01,
0xf2,0x4d,
0xfd,0x02,
0x5b,0x05,
0x5c,0xa0,
0xfd,0x01,
0x26,0x80,
0x27,0x4f,
0x28,0x00,
0x29,0x20,
0x2a,0x00,
0x2b,0x03,
0x2c,0x00,
0x2d,0x20,
0x30,0x00,
0x31,0x00,
0xfd,0x01,
0xa1,0x1b,
0xa2,0x16,
0xa3,0x09,
0xa4,0x1a,
0xa5,0x1a,
0xa6,0x16,
0xa7,0x0c,
0xa8,0x1b,
0xa9,0x15,
0xaa,0x12,
0xab,0x07,
0xac,0x18,
0xad,0x05,
0xae,0x07,
0xaf,0x06,
0xb0,0x05,
0xb1,0x00,
0xb2,0x00,
0xb3,0x02,
0xb4,0x01,
0xb5,0x02,
0xb6,0x03,
0xb7,0x04,
0xb8,0x02,
0xfd,0x02,
0x08,0x00,
0x09,0x06,
0x1d,0x03,
0x1f,0x05,
0xfd,0x01,
0x32,0x00,
0xfd,0x02,
0x26,0xbf,
0x27,0xa3,
0xfd,0x00,
0xe7,0x03,
0xe7,0x00,
0xfd,0x02,
0x10,0xd3,
0x11,0xd3,
0x1b,0x80,
0x1a,0x80,
0x18,0x27,
0x19,0x26,
0x2a,0x00,
0x2b,0x00,
0x28,0xf8,
0x29,0x08,
0x66,0x4a,
0x67,0x6c,
0x68,0xd4,
0x69,0xf4,
0x6a,0xa5,
0x7c,0x30,
0x7d,0x4b,
0x7e,0xf7,
0x7f,0x13,
0x80,0xa6,
0x70,0x26,
0x71,0x4a,
0x72,0x25,
0x73,0x46,
0x74,0xaa,
0x6b,0x0a,
0x6c,0x31,
0x6d,0x2e,
0x6e,0x52,
0x6f,0xaa,
0x61,0xff,
0x62,0x18,
0x63,0x40,
0x64,0x6a,
0x65,0x6a,
0x75,0x80,
0x76,0x09,
0x77,0x02,
0x24,0x25,
0x0e,0x16,
0x3b,0x09,
0xfd,0x02,
0xde,0x0f,
0xd7,0x08,
0xd8,0x08,
0xd9,0x10,
0xda,0x14,
0xe8,0x20,
0xe9,0x20,
0xea,0x20,
0xeb,0x20,
0xec,0x28,
0xed,0x28,
0xee,0x20,
0xef,0x20,
0xd3,0x20,
0xd4,0x48,
0xd5,0x20,
0xd6,0x08,
0xfd,0x01,
0xd1,0x20,
0xfd,0x02,
0xdc,0x05,
0x05,0x20,
0xfd,0x02,
0x81,0x00,
0xfd,0x01,
0xfc,0x00,
0x7d,0x05,
0x7e,0x05,
0x7f,0x09,
0x80,0x08,
0xfd,0x02,
0xdd,0x0f,
0xfd,0x01,
0x6d,0x08,
0x6e,0x0f,
0x6f,0x20,
0x70,0x28,
0x86,0x28,
0x71,0x06,
0x72,0x07,
0x73,0x10,
0x74,0x14,
0x75,0x08,
0x76,0x08,
0x77,0x06,
0x78,0x06,
0x79,0x25,
0x7a,0x13,
0x7b,0x12,
0x7c,0x00,
0x81,0x0d,
0x82,0x18,
0x83,0x20,
0x84,0x24,
0xfd,0x02,
0x83,0x12,
0x84,0x14,
0x86,0x04,
0xfd,0x01,
0x61,0x60,
0x62,0x28,
0x8a,0x10,
0xfd,0x01,
0x8b,0x00,
0x8c,0x00,
0x8d,0x16,
0x8e,0x23,
0x8f,0x2f,
0x90,0x44,
0x91,0x57,
0x92,0x66,
0x93,0x73,
0x94,0x8b,
0x95,0x9e,
0x96,0xaf,
0x97,0xbd,
0x98,0xc8,
0x99,0xd1,
0x9a,0xd7,
0x9b,0xdd,
0x9c,0xe1,
0x9d,0xe5,
0x9e,0xe8,
0x9f,0xe9,
0xa0,0xeb,
0xfd,0x02,
0x15,0xc0,
0x16,0x8c,
0xa0,0x8a,
0xa1,0xf6,
0xa2,0x00,
0xa3,0x15,
0xa4,0x73,
0xa5,0xf7,
0xa6,0x18,
0xa7,0xcf,
0xa8,0x99,
0xa9,0x0c,
0xaa,0x30,
0xab,0x0c,
0xac,0x93,
0xad,0xe7,
0xae,0x06,
0xaf,0xda,
0xb0,0xcc,
0xb1,0xda,
0xb2,0xda,
0xb3,0xda,
0xb4,0xcc,
0xb5,0x0c,
0xb6,0x33,
0xb7,0x0f,
0xfd,0x01,
0xd3,0x80,
0xd4,0x80,
0xd5,0x70,
0xd6,0x50,
0xd7,0x80,
0xd8,0x80,
0xd9,0x70,
0xda,0x50,
0xfd,0x01,
0xdd,0x30,
0xde,0x10,
0xdf,0xff,
0x00,0x00,
0xfd,0x01,
0xc2,0xaa,
0xc3,0x77,
0xc4,0x77,
0xc5,0x66,
0xfd,0x01,
0xcd,0x10,
0xce,0x1f,
0xcf,0x30,
0xd0,0x45,
0xfd,0x02,
0x31,0x60,
0x32,0x60,
0x33,0xc0,
0x35,0x60,
0x37,0x13,
0xfd,0x01,
0x0e,0x80,
0x0f,0x20,
0x10,0x70,
0x11,0x70,
0x12,0x78,
0x13,0x78,
0x14,0xa8,
0x15,0xa0,
0x16,0xa0,
0x17,0xa0,
0xfd,0x00,
0x31,0x01,
0xfd,0x01,
0x32,0x15,
0x33,0xef,
0x34,0x07,
0xd2,0x01,
0xfb,0x25,
0xf2,0x49,
0x35,0x40,
0x5d,0x11,
0xfd,0x00,
0xfd,0x00,
0x1b,0x20,
0xff,0xff,
};
SENSOR_OP_SECTION const _Sensor_Adpt_ sp0a20_cmd=
{
.typ = 1, //YUV
.pixelw = 640,
.pixelh= 480,
.hsyn = 1,
.vsyn = 1,
.rduline = 0,
.rawwide = 1,//10bit
.colrarray = 2,//0:_RGRG_ 1:_GRGR_,2:_BGBG_,3:_GBGB_
.init = (uint8 *)SP0A20InitTable,
.rotate_adapt = {0},
.hvb_adapt = {0},
.mclk = 24000000,
.p_fun_adapt = {NULL,NULL,NULL},
.p_xc7016_adapt = {NULL},
};
const _Sensor_Ident_ sp0a20_init=
{
//id, w_cmd, r_cmd, addr_num, data_num, id_reg
0x2b,0x42,0x43,0x01,0x01,0x02
};
#endif
+1 -1
View File
@@ -23,7 +23,7 @@ __init void sys_sleepdata_init(void)
struct system_sleepdata *sdata = (struct system_sleepdata *)start; struct system_sleepdata *sdata = (struct system_sleepdata *)start;
flags = disable_irq(); flags = disable_irq();
if (sdata->magic1 != 0x1A2B3C4D || sdata->magic2 != 0xD4C3B2A1) { if (sdata->magic1 != 0x1A2B3C4D || sdata->magic2 != 0xD4C3B2A1) {
//dump_hex("sleepdata_init: ", ((uint8 *)&__sleep_data_stop) + 4 , 4, 1); dump_hex("sleepdata_init: ", ((uint8 *)&__sleep_data_stop) + 4 , 4, 1);
os_memset(sdata, 0, sizeof(struct system_sleepdata)); os_memset(sdata, 0, sizeof(struct system_sleepdata));
sdata->magic1 = 0x1A2B3C4D; sdata->magic1 = 0x1A2B3C4D;
sdata->magic2 = 0xD4C3B2A1; sdata->magic2 = 0xD4C3B2A1;
-19
View File
@@ -588,25 +588,6 @@ free_socket_free_elements(int is_tcp, struct netconn *conn, union lwip_sock_last
} }
} }
int LWIP_GetMaxSockets()
{
return NUM_SOCKETS;
}
int LWIP_GetActiveSockets()
{
int i;
int r = 0;
for(i = 0; i < NUM_SOCKETS; ++i)
{
if(sockets[i].conn)
{
r++;
}
}
return r;
}
/** Free a socket. The socket's netconn must have been /** Free a socket. The socket's netconn must have been
* delete before! * delete before!
* *
+2
View File
@@ -1889,6 +1889,8 @@ tcp_alloc(u8_t prio)
/* adjust err stats: memp_malloc failed above */ /* adjust err stats: memp_malloc failed above */
MEMP_STATS_DEC(err, MEMP_TCP_PCB); MEMP_STATS_DEC(err, MEMP_TCP_PCB);
} }
}else{
printf("NO FREE TCP_PCB! total:%d\r\n", MEMP_NUM_TCP_PCB);
} }
if (pcb != NULL) { if (pcb != NULL) {
+21 -159
View File
@@ -1,7 +1,7 @@
#include "sys_config.h" #include "sys_config.h"
#include "typesdef.h" #include "typesdef.h"
#include "lib/video/dvp/cmos_sensor/csi.h" #include "lib/video/dvp/cmos_sensor/csi.h"
#include "lib/video/dvp/cmos_sensor/csi_v2.h" #include "lib/video/dvp/cmos_sensor/csi_V2.h"
#include "devid.h" #include "devid.h"
#include "hal/gpio.h" #include "hal/gpio.h"
#include "osal/irq.h" #include "osal/irq.h"
@@ -137,18 +137,6 @@ static const _Sensor_Ident_ *devSensorInitTable[] = {
&sc101iot_init, &sc101iot_init,
#endif #endif
#if DEV_SENSOR_HI704
&hi704_init,
#endif
#if DEV_SENSOR_SP0828
&sp0828_init,
#endif
#if DEV_SENSOR_SP0A20
&sp0a20_init,
#endif
NULL, NULL,
}; };
@@ -246,127 +234,8 @@ static const _Sensor_Adpt_ *devSensorOPTable[] = {
&sc101iot_cmd, &sc101iot_cmd,
#endif #endif
#if DEV_SENSOR_HI704
&hi704_cmd,
#endif
#if DEV_SENSOR_SP0828
&sp0828_cmd,
#endif
#if DEV_SENSOR_SP0A20
&sp0a20_cmd,
#endif
}; };
// Keep same order as devSensorOPTable - helps ID which driver is used to init sensor
static const char *devSensorNameTable[] = {
#if DEV_SENSOR_GC0308
"gc0308",
#endif
#if DEV_SENSOR_GC0309
"gc0309",
#endif
#if DEV_SENSOR_GC0311
"gc0311",
#endif
#if DEV_SENSOR_GC0312
"gc0312",
#endif
#if DEV_SENSOR_GC0328
"gc0328",
#endif
#if DEV_SENSOR_GC0329
"gc0329",
#endif
#if DEV_SENSOR_BF3A03
"bf3a03",
#endif
#if DEV_SENSOR_BF3703
"bf3703",
#endif
#if DEV_SENSOR_OV2640
"ov2640",
#endif
#if DEV_SENSOR_OV7725
"ov7725",
#endif
#if DEV_SENSOR_OV7670
"ov7670",
#endif
#if DEV_SENSOR_OV7660
"ov7660",
#endif
#if DEV_SENSOR_BF2013
"bf2013",
#endif
#if DEV_SENSOR_XC7016_H63
"xc7016_h63",
#endif
#if DEV_SENSOR_XC7011_H63
"xc7011_h63",
#endif
#if DEV_SENSOR_XC7011_GC1054
"xc7011_gc1054",
#endif
#if DEV_SENSOR_XCG532
"xcg532",
#endif
#if DEV_SENSOR_GC2145
"gc2145",
#endif
#if DEV_SENSOR_SP0718
"sp0718",
#endif
#if DEV_SENSOR_SP0A19
"sp0a19",
#endif
#if DEV_SENSOR_BF3720
"bf3720",
#endif
#if DEV_SENSOR_NT99230
"nt99230",
#endif
#if DEV_SENSOR_IOT101
"sc101iot",
#endif
#if DEV_SENSOR_HI704
"hi704",
#endif
#if DEV_SENSOR_SP0828
"sp0828",
#endif
#if DEV_SENSOR_SP0A20
"sp0a20",
#endif
};
#if IPF_EN #if IPF_EN
#if 1 #if 1
@@ -1137,12 +1006,7 @@ int sensorCheckId(struct i2c_device *p_iic,const _Sensor_Ident_ *p_sensor_ident,
i2c_read(p_iic,u8Buf,p_sensor_ident->addr_num,(int8*)&id,p_sensor_ident->data_num); i2c_read(p_iic,u8Buf,p_sensor_ident->addr_num,(int8*)&id,p_sensor_ident->data_num);
os_printf("SID: id=0x%02x expect=0x%02x addr8={0x%02x,0x%02x} addr7=0x%02x reg=0x%02x\r\n", os_printf("SID: %x, %x, %x, %x,%x\r\n",id,p_sensor_ident->id,u8SensorwriteID,u8SensorreadID,p_sensor_ident->id_reg);
id, p_sensor_ident->id,
u8SensorwriteID, u8SensorreadID,
(u8SensorwriteID >> 1),
p_sensor_ident->id_reg);
if(id == p_sensor_ident->id) if(id == p_sensor_ident->id)
return 1; return 1;
else else
@@ -1168,22 +1032,15 @@ static _Sensor_Adpt_ * sensorAutoCheck(struct i2c_device *p_iic,uint8 *init_buf)
sensor_reset(); sensor_reset();
if(sensorCheckId(p_iic,devSensorInitTable[i],devSensorOPTable[i])>=0) if(sensorCheckId(p_iic,devSensorInitTable[i],devSensorOPTable[i])>=0)
{ {
devSensorInit = (_Sensor_Ident_ *) devSensorInitTable[i]; os_printf("id =%x num:%d \n",devSensorInitTable[i]->id,i);
devSensor_Struct= (_Sensor_Adpt_ *) devSensorOPTable[i]; devSensorInit = (_Sensor_Ident_ *) devSensorInitTable[i];
//#if CMOS_AUTO_LOAD
// New, more informative line: // devSensor_Struct = sensor_adpt_load(devSensorInit->id,devSensorInit->w_cmd,devSensorInit->r_cmd,init_buf);
os_printf("sensor driver match: name=%s id=0x%02x num=%d addr7=0x%02x mclk=%d pix=%dx%d\r\n", //#else
devSensorNameTable[i], devSensor_Struct = (_Sensor_Adpt_ *) devSensorOPTable[i];
devSensorInit->id, //#endif
i,
(devSensorInit->w_cmd >> 1), // 7-bit I2C address
devSensor_Struct->mclk,
devSensor_Struct->pixelw,
devSensor_Struct->pixelh);
break; break;
} }
} }
if(devSensor_Struct == NULL) if(devSensor_Struct == NULL)
{ {
@@ -1261,7 +1118,7 @@ void vpp_hsie_isr(uint32 irq,uint32 image_h,uint32 param){
void vpp_vsie_isr(uint32 irq,uint32 dev,uint32 param){ void vpp_vsie_isr(uint32 irq,uint32 dev,uint32 param){
vs_isr++; vs_isr++;
//set_time_watermark(2022,9,1,20,1,(os_jiffies()/1000)%60); set_time_watermark(2022,9,1,20,1,(os_jiffies()/1000)%60);
} }
void vpp_data_done(uint32 irq,uint32 dev,uint32 param){ void vpp_data_done(uint32 irq,uint32 dev,uint32 param){
@@ -1774,9 +1631,9 @@ bool csi_yuv_mode(){
i2c_ioctl(iic_test,IIC_STRONG_OUTPUT,1); i2c_ioctl(iic_test,IIC_STRONG_OUTPUT,1);
//i2c_send_stop(iic_test); //i2c_send_stop(iic_test);
os_printf("iic init finish,sensor reset & set sensor clk into 8M\r\n"); os_printf("iic init finish,sensor reset & set sensor clk into 6M\r\n");
//2:init sensor //2:init sensor
dvp_set_baudrate(dvp_test,8000000); dvp_set_baudrate(dvp_test,6000000);
os_sleep_ms(3); os_sleep_ms(3);
os_printf("set sensor finish ,Auto Check sensor id\r\n"); os_printf("set sensor finish ,Auto Check sensor id\r\n");
@@ -1960,11 +1817,11 @@ bool csi_yuv_mode(){
vpp_set_water0_color(vpp_test,0xff,0x80,0x80); vpp_set_water0_color(vpp_test,0xff,0x80,0x80);
vpp_set_water0_bitmap(vpp_test,(uint32)ele_lib); vpp_set_water0_bitmap(vpp_test,(uint32)ele_lib);
vpp_set_water0_locate(vpp_test,0,0); vpp_set_water0_locate(vpp_test,50,36);
vpp_set_water0_contrast(vpp_test,0); vpp_set_water0_contrast(vpp_test,0);
vpp_set_watermark0_charsize_and_num(vpp_test,12,32,19); vpp_set_watermark0_charsize_and_num(vpp_test,12,32,19);
vpp_set_watermark0_mode(vpp_test,1); vpp_set_watermark0_mode(vpp_test,1);
set_time_watermark(0000,00,00,00,00,00); set_time_watermark(2222,22,22,22,22,22);
vpp_set_water0_rc(vpp_test,0); vpp_set_water0_rc(vpp_test,0);
@@ -2004,8 +1861,8 @@ bool csi_yuv_mode(){
#endif #endif
vpp_set_mode(vpp_test,IMAGE_FORMAT); vpp_set_mode(vpp_test,IMAGE_FORMAT);
vpp_set_watermark0_enable(vpp_test,0); vpp_set_watermark0_enable(vpp_test,1);
vpp_set_watermark1_enable(vpp_test,0); vpp_set_watermark1_enable(vpp_test,1);
#if IPF_EN #if IPF_EN
// vpp_set_ifp_en(vpp_test,1); // vpp_set_ifp_en(vpp_test,1);
@@ -2048,3 +1905,8 @@ bool csi_open(){
#endif #endif
-1
View File
@@ -1 +0,0 @@
gcc