Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05bd1742cd | ||
|
|
c9225190f2 | ||
|
|
d96e703e90 | ||
|
|
9f1291c400 | ||
|
|
37e27673fd | ||
|
|
beed2be607 | ||
|
|
81d5621bab | ||
|
|
1e529c2c72 | ||
|
|
3764154c3e | ||
|
|
5f7110258f | ||
|
|
e024c63f62 | ||
|
|
dff89205ca | ||
|
|
e0876478d0 | ||
|
|
ec33aadfdc |
+9
-19
@@ -1,19 +1,9 @@
|
|||||||
CMakeLists.txt.user
|
.cache/
|
||||||
CMakeCache.txt
|
.cdk/
|
||||||
CMakeFiles
|
*.cdkws
|
||||||
CMakeScripts
|
project/obj/
|
||||||
Testing
|
fpv_app_umac*
|
||||||
Makefile
|
cdkws.mk
|
||||||
cmake_install.cmake
|
project.map
|
||||||
install_manifest.txt
|
*.o
|
||||||
compile_commands.json
|
*.d
|
||||||
CTestTestfile.cmake
|
|
||||||
_deps
|
|
||||||
CMakeUserPresets.json
|
|
||||||
|
|
||||||
# CLion
|
|
||||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
||||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
||||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
||||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
||||||
#cmake-build-*
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Taixin TXW81x IPC/DV
|
Taixin TXW81x IPC/DV
|
||||||
|
|
||||||
https://www.elektroda.com/rtvforum/topic4033757.html
|
https://www.elektroda.com/rtvforum/topic4033757.html<br>
|
||||||
https://www.elektroda.com/rtvforum/topic4129331.html
|
https://www.elektroda.com/rtvforum/topic4129331.html<br>
|
||||||
https://www.elektroda.com/rtvforum/topic4123724.html
|
https://www.elektroda.com/rtvforum/topic4123724.html<br>
|
||||||
https://www.elektroda.com/rtvforum/topic4120455.html
|
https://www.elektroda.com/rtvforum/topic4120455.html<br>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
*.bin
|
||||||
|
*.hex
|
||||||
|
*.elf
|
||||||
|
*.bin.xz
|
||||||
Regular → Executable
+2
-2
@@ -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
File diff suppressed because one or more lines are too long
+60
-60
@@ -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"
|
||||||
@@ -932,7 +932,7 @@ __init static void app_network_init()
|
|||||||
if (sys_cfgs.wifi_mode == WIFI_MODE_AP) { //AP
|
if (sys_cfgs.wifi_mode == WIFI_MODE_AP) { //AP
|
||||||
sys_dhcpd_start();
|
sys_dhcpd_start();
|
||||||
}
|
}
|
||||||
ota_Tcp_Server();
|
//ota_Tcp_Server();
|
||||||
#if NET_TO_QC == 1
|
#if NET_TO_QC == 1
|
||||||
if (sys_cfgs.wifi_mode == WIFI_MODE_STA){
|
if (sys_cfgs.wifi_mode == WIFI_MODE_STA){
|
||||||
sta_send_udp_msg_init();
|
sta_send_udp_msg_init();
|
||||||
@@ -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
|
||||||
#endif
|
// void lvgl_init(uint16_t w,uint16_t h,uint8_t rotate);
|
||||||
|
// lvgl_init(w,h,rotate);
|
||||||
#if (USB_EN && !RTT_USB_EN)
|
//#endif
|
||||||
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()) {
|
||||||
@@ -1377,10 +1377,10 @@ int main()
|
|||||||
mcu_watchdog_timeout(5);
|
mcu_watchdog_timeout(5);
|
||||||
OS_WORK_INIT(&main_wk, main_loop2, 0);
|
OS_WORK_INIT(&main_wk, main_loop2, 0);
|
||||||
os_run_work_delay(&main_wk, 1000);
|
os_run_work_delay(&main_wk, 1000);
|
||||||
speedTest_tcp_server(20202);
|
//speedTest_tcp_server(20202);
|
||||||
speedTest_tcp_rx_server(20203);
|
//speedTest_tcp_rx_server(20203);
|
||||||
Udp_rx_server(20204,1000);
|
//Udp_rx_server(20204,1000);
|
||||||
Udp_to_ip("192.168.1.100",20202,0);
|
//Udp_to_ip("192.168.1.100",20202,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Regular → Executable
@@ -1,15 +1,3 @@
|
|||||||
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
@@ -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,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
|
||||||
|
|||||||
+38
-2325
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
|||||||
|
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.
@@ -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 = 0x3fffc /* on-chip SRAM 288KB */
|
SRAM : ORIGIN = 0x20000004 , LENGTH = 0x431fc /* 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 = 0x20040000);
|
PROVIDE (__ram_end = 0x20043200);
|
||||||
PROVIDE (__heap_end = 0x20040000);
|
PROVIDE (__heap_end = 0x20043200);
|
||||||
PROVIDE (__sleep_data_start = 0x20040004);
|
PROVIDE (__sleep_data_start = 0x20043200);
|
||||||
PROVIDE (__sleep_data_stop = 0x20040a00);
|
PROVIDE (__sleep_data_stop = 0x20043bfc);
|
||||||
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", SRAM0);
|
REGION_ALIAS("REGION_DSLEEP", SRAM);
|
||||||
|
|
||||||
ENTRY(Reset_Handler)
|
ENTRY(Reset_Handler)
|
||||||
SECTIONS
|
SECTIONS
|
||||||
@@ -293,5 +293,4 @@ 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(romcode.ld)
|
INPUT(utilities/romcode.ld)
|
||||||
|
|
||||||
@@ -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("$");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#define SPOOK_MAX_FRAME_SIZE 0/*352*288*3*/
|
#define SPOOK_MAX_FRAME_SIZE 0/*352*288*3*/
|
||||||
#define SPOOK_PORT 7070
|
#define SPOOK_PORT 7070
|
||||||
|
|
||||||
//#define JPEG_ENCODER_NAME "jpeg_dvp"
|
#define JPEG_ENCODER_NAME "jpeg_dvp"
|
||||||
//#define JPEG_ENCODER2_NAME "jpeg_usb"
|
//#define JPEG_ENCODER2_NAME "jpeg_usb"
|
||||||
|
|
||||||
#define FILE_JPEG_ENCODER_NAME "jpeg_file"
|
#define FILE_JPEG_ENCODER_NAME "jpeg_file"
|
||||||
@@ -20,18 +20,18 @@
|
|||||||
|
|
||||||
#define EXCHANGER_SLOT_SIZE 16
|
#define EXCHANGER_SLOT_SIZE 16
|
||||||
|
|
||||||
//#define RTSP_LIVE_PATH "/webcam" /* /webcam */
|
#define RTSP_LIVE_PATH "/webcam" /* /webcam */
|
||||||
//#define RTSP_LIVE_USB_PATH "/webcam2" /* /webcam */
|
//#define RTSP_LIVE_USB_PATH "/webcam2" /* /webcam */
|
||||||
#define RTSP_WEB_PATH "/file" /* /webcam */
|
//#define RTSP_WEB_PATH "/file" /* /webcam */
|
||||||
|
|
||||||
|
|
||||||
//#define RTSP_LIVE_TRACK "jpeg_dvp"
|
#define RTSP_LIVE_TRACK "jpeg_dvp"
|
||||||
//#define RTSP_LIVE2_TRACK "jpeg_usb"
|
//#define RTSP_LIVE2_TRACK "jpeg_usb"
|
||||||
#define RTSP_WEBFILE_TRACK "jpeg_file"
|
//#define RTSP_WEBFILE_TRACK "jpeg_file"
|
||||||
|
|
||||||
|
|
||||||
#define RTSP_LIVE_AUDIO_TRACK "audio"
|
//#define RTSP_LIVE_AUDIO_TRACK "audio"
|
||||||
#define RTSP_WEBFILE_AUDIO_TRACK "audio_file"
|
//#define RTSP_WEBFILE_AUDIO_TRACK "audio_file"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -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>
|
||||||
@@ -361,7 +361,7 @@ static int unbase64( unsigned char *d, int len, int *remain )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static unsigned char s_ptemp[300] = {"TEARDOWN rtsp://192.168.1.1:7070/webcam/ RTSP/1.0\r\nCSeq: 6\r\nUser-Agent: Lavf56.40.101\r\nSession: 9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9\r\n\r\n4A5A6A7A8A9\r\n\r\n"};
|
static unsigned char s_ptemp[300] = {"TEARDOWN rtsp://192.168.4.1:7070/webcam/ RTSP/1.0\r\nCSeq: 6\r\nUser-Agent: Lavf56.40.101\r\nSession: 9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9\r\n\r\n4A5A6A7A8A9\r\n\r\n"};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
|
|
||||||
__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)
|
||||||
@@ -684,15 +686,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(PIN_IIC2_SCL, GPIO_IOMAP_IN_SPI2_SCK_IN, GPIO_IOMAP_OUT_SPI2_SCK_OUT);
|
gpio_iomap_inout(dvp_scl, GPIO_IOMAP_IN_SPI2_SCK_IN, GPIO_IOMAP_OUT_SPI2_SCK_OUT);
|
||||||
gpio_iomap_inout(PIN_IIC2_SDA, GPIO_IOMAP_IN_SPI2_IO0_IN, GPIO_IOMAP_OUT_SPI2_IO0_OUT);
|
gpio_iomap_inout(dvp_sda, GPIO_IOMAP_IN_SPI2_IO0_IN, GPIO_IOMAP_OUT_SPI2_IO0_OUT);
|
||||||
gpio_driver_strength(PIN_IIC2_SCL, GPIO_DS_28MA);
|
gpio_driver_strength(dvp_scl, GPIO_DS_28MA);
|
||||||
gpio_driver_strength(PIN_IIC2_SDA, GPIO_DS_28MA);
|
gpio_driver_strength(dvp_sda, GPIO_DS_28MA);
|
||||||
gpio_set_mode(PIN_IIC2_SCL, GPIO_OPENDRAIN_PULL_UP, GPIO_PULL_LEVEL_4_7K);
|
gpio_set_mode(dvp_scl, GPIO_OPENDRAIN_PULL_UP, GPIO_PULL_LEVEL_4_7K);
|
||||||
gpio_set_mode(PIN_IIC2_SDA, GPIO_OPENDRAIN_PULL_UP, GPIO_PULL_LEVEL_4_7K);
|
gpio_set_mode(dvp_sda, GPIO_OPENDRAIN_PULL_UP, GPIO_PULL_LEVEL_4_7K);
|
||||||
} else {
|
} else {
|
||||||
gpio_set_dir(PIN_IIC2_SCL, GPIO_DIR_INPUT);
|
gpio_set_dir(dvp_scl, GPIO_DIR_INPUT);
|
||||||
gpio_set_dir(PIN_IIC2_SDA, GPIO_DIR_INPUT);
|
gpio_set_dir(dvp_sda, GPIO_DIR_INPUT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -160,20 +160,20 @@ extern void hw_memcpy(void *dest, const void *src, unsigned int size);
|
|||||||
#if IP_NAT
|
#if IP_NAT
|
||||||
#define PBUF_POOL_SIZE 32//pbuf pool size,PBUF_POOL
|
#define PBUF_POOL_SIZE 32//pbuf pool size,PBUF_POOL
|
||||||
#else
|
#else
|
||||||
#define PBUF_POOL_SIZE 6//pbuf pool size,PBUF_POOL
|
#define PBUF_POOL_SIZE 16//pbuf pool size,PBUF_POOL
|
||||||
#endif
|
#endif
|
||||||
#endif//PBUF_POOL_SIZE
|
#endif//PBUF_POOL_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 2
|
#define MEMP_NUM_TCP_PCB_LISTEN 6
|
||||||
#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 4
|
#define MEMP_NUM_TCP_PCB 20
|
||||||
#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).
|
||||||
@@ -184,7 +184,7 @@ extern void hw_memcpy(void *dest, const void *src, unsigned int size);
|
|||||||
// Number of non-pool pbufs.
|
// Number of non-pool pbufs.
|
||||||
// Each requires 92 bytes of RAM.
|
// Each requires 92 bytes of RAM.
|
||||||
#ifndef MEMP_NUM_PBUF
|
#ifndef MEMP_NUM_PBUF
|
||||||
#define MEMP_NUM_PBUF 10 //PBUF_REF/ROM
|
#define MEMP_NUM_PBUF 32 //PBUF_REF/ROM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Each netbuf requires 64 bytes of RAM.
|
// Each netbuf requires 64 bytes of RAM.
|
||||||
@@ -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 6
|
#define MEMP_NUM_NETCONN 20
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -302,11 +302,21 @@ 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;
|
||||||
@@ -435,4 +445,19 @@ 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
|
||||||
|
|||||||
@@ -89,7 +89,10 @@ 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
|
||||||
|
|||||||
@@ -0,0 +1,391 @@
|
|||||||
|
#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
|
||||||
@@ -0,0 +1,280 @@
|
|||||||
|
#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
|
||||||
@@ -0,0 +1,401 @@
|
|||||||
|
#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
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -0,0 +1,361 @@
|
|||||||
|
|
||||||
|
# Also see "include/mbedtls/mbedtls_config.h"
|
||||||
|
|
||||||
|
CFLAGS ?= -O2
|
||||||
|
WARNING_CFLAGS ?= -Wall -Wextra -Wformat=2 -Wno-format-nonliteral
|
||||||
|
LDFLAGS ?=
|
||||||
|
|
||||||
|
# Include ../include for public headers and . for private headers.
|
||||||
|
# Note that . needs to be included explicitly for the sake of library
|
||||||
|
# files that are not in the /library directory (which currently means
|
||||||
|
# under /3rdparty).
|
||||||
|
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I. -I../include -D_FILE_OFFSET_BITS=64
|
||||||
|
LOCAL_LDFLAGS =
|
||||||
|
|
||||||
|
ifdef DEBUG
|
||||||
|
LOCAL_CFLAGS += -g3
|
||||||
|
endif
|
||||||
|
|
||||||
|
# MicroBlaze specific options:
|
||||||
|
# CFLAGS += -mno-xl-soft-mul -mxl-barrel-shift
|
||||||
|
|
||||||
|
# To compile on Plan9:
|
||||||
|
# CFLAGS += -D_BSD_EXTENSION
|
||||||
|
|
||||||
|
PERL ?= perl
|
||||||
|
|
||||||
|
ifdef WINDOWS
|
||||||
|
PYTHON ?= python
|
||||||
|
else
|
||||||
|
PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# if were running on Windows build for Windows
|
||||||
|
ifdef WINDOWS
|
||||||
|
WINDOWS_BUILD=1
|
||||||
|
else ifeq ($(shell uname -s),Darwin)
|
||||||
|
ifeq ($(AR),ar)
|
||||||
|
APPLE_BUILD ?= 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# To compile as a shared library:
|
||||||
|
ifdef SHARED
|
||||||
|
# all code is position-indep with mingw, avoid warning about useless flag
|
||||||
|
ifndef WINDOWS_BUILD
|
||||||
|
LOCAL_CFLAGS += -fPIC -fpic
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
SOEXT_TLS?=so.19
|
||||||
|
SOEXT_X509?=so.5
|
||||||
|
SOEXT_CRYPTO?=so.14
|
||||||
|
|
||||||
|
# Set AR_DASH= (empty string) to use an ar implementation that does not accept
|
||||||
|
# the - prefix for command line options (e.g. llvm-ar)
|
||||||
|
AR_DASH ?= -
|
||||||
|
|
||||||
|
ARFLAGS = $(AR_DASH)src
|
||||||
|
ifdef APPLE_BUILD
|
||||||
|
ifneq ($(APPLE_BUILD),0)
|
||||||
|
ARFLAGS = $(AR_DASH)Src
|
||||||
|
RLFLAGS = -no_warning_for_no_symbols -c
|
||||||
|
RL ?= ranlib
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
DLEXT ?= so
|
||||||
|
ifdef WINDOWS_BUILD
|
||||||
|
# Windows shared library extension:
|
||||||
|
DLEXT = dll
|
||||||
|
else ifdef APPLE_BUILD
|
||||||
|
ifneq ($(APPLE_BUILD),0)
|
||||||
|
# Mac OS X shared library extension:
|
||||||
|
DLEXT = dylib
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
OBJS_CRYPTO= \
|
||||||
|
aes.o \
|
||||||
|
aesni.o \
|
||||||
|
aesce.o \
|
||||||
|
aria.o \
|
||||||
|
asn1parse.o \
|
||||||
|
asn1write.o \
|
||||||
|
base64.o \
|
||||||
|
bignum.o \
|
||||||
|
bignum_core.o \
|
||||||
|
bignum_mod.o \
|
||||||
|
bignum_mod_raw.o \
|
||||||
|
camellia.o \
|
||||||
|
ccm.o \
|
||||||
|
chacha20.o \
|
||||||
|
chachapoly.o \
|
||||||
|
cipher.o \
|
||||||
|
cipher_wrap.o \
|
||||||
|
cmac.o \
|
||||||
|
constant_time.o \
|
||||||
|
ctr_drbg.o \
|
||||||
|
des.o \
|
||||||
|
dhm.o \
|
||||||
|
ecdh.o \
|
||||||
|
ecdsa.o \
|
||||||
|
ecjpake.o \
|
||||||
|
ecp.o \
|
||||||
|
ecp_curves.o \
|
||||||
|
entropy.o \
|
||||||
|
entropy_poll.o \
|
||||||
|
error.o \
|
||||||
|
gcm.o \
|
||||||
|
hash_info.o \
|
||||||
|
hkdf.o \
|
||||||
|
hmac_drbg.o \
|
||||||
|
lmots.o \
|
||||||
|
lms.o \
|
||||||
|
md.o \
|
||||||
|
md5.o \
|
||||||
|
memory_buffer_alloc.o \
|
||||||
|
nist_kw.o \
|
||||||
|
oid.o \
|
||||||
|
padlock.o \
|
||||||
|
pem.o \
|
||||||
|
pk.o \
|
||||||
|
pk_wrap.o \
|
||||||
|
pkcs12.o \
|
||||||
|
pkcs5.o \
|
||||||
|
pkparse.o \
|
||||||
|
pkwrite.o \
|
||||||
|
platform.o \
|
||||||
|
platform_util.o \
|
||||||
|
poly1305.o \
|
||||||
|
psa_crypto.o \
|
||||||
|
psa_crypto_aead.o \
|
||||||
|
psa_crypto_cipher.o \
|
||||||
|
psa_crypto_client.o \
|
||||||
|
psa_crypto_driver_wrappers.o \
|
||||||
|
psa_crypto_ecp.o \
|
||||||
|
psa_crypto_hash.o \
|
||||||
|
psa_crypto_mac.o \
|
||||||
|
psa_crypto_pake.o \
|
||||||
|
psa_crypto_rsa.o \
|
||||||
|
psa_crypto_se.o \
|
||||||
|
psa_crypto_slot_management.o \
|
||||||
|
psa_crypto_storage.o \
|
||||||
|
psa_its_file.o \
|
||||||
|
psa_util.o \
|
||||||
|
ripemd160.o \
|
||||||
|
rsa.o \
|
||||||
|
rsa_alt_helpers.o \
|
||||||
|
sha1.o \
|
||||||
|
sha256.o \
|
||||||
|
sha512.o \
|
||||||
|
threading.o \
|
||||||
|
timing.o \
|
||||||
|
version.o \
|
||||||
|
version_features.o \
|
||||||
|
# This line is intentionally left blank
|
||||||
|
|
||||||
|
include ../3rdparty/Makefile.inc
|
||||||
|
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
||||||
|
OBJS_CRYPTO+=$(THIRDPARTY_CRYPTO_OBJECTS)
|
||||||
|
|
||||||
|
OBJS_X509= \
|
||||||
|
x509.o \
|
||||||
|
x509_create.o \
|
||||||
|
x509_crl.o \
|
||||||
|
x509_crt.o \
|
||||||
|
x509_csr.o \
|
||||||
|
x509write_crt.o \
|
||||||
|
x509write_csr.o \
|
||||||
|
pkcs7.o \
|
||||||
|
# This line is intentionally left blank
|
||||||
|
|
||||||
|
OBJS_TLS= \
|
||||||
|
debug.o \
|
||||||
|
mps_reader.o \
|
||||||
|
mps_trace.o \
|
||||||
|
net_sockets.o \
|
||||||
|
ssl_cache.o \
|
||||||
|
ssl_ciphersuites.o \
|
||||||
|
ssl_client.o \
|
||||||
|
ssl_cookie.o \
|
||||||
|
ssl_debug_helpers_generated.o \
|
||||||
|
ssl_msg.o \
|
||||||
|
ssl_ticket.o \
|
||||||
|
ssl_tls.o \
|
||||||
|
ssl_tls12_client.o \
|
||||||
|
ssl_tls12_server.o \
|
||||||
|
ssl_tls13_keys.o \
|
||||||
|
ssl_tls13_client.o \
|
||||||
|
ssl_tls13_server.o \
|
||||||
|
ssl_tls13_generic.o \
|
||||||
|
# This line is intentionally left blank
|
||||||
|
|
||||||
|
.SILENT:
|
||||||
|
|
||||||
|
.PHONY: all static shared clean
|
||||||
|
|
||||||
|
ifndef SHARED
|
||||||
|
all: static
|
||||||
|
else
|
||||||
|
all: shared static
|
||||||
|
endif
|
||||||
|
|
||||||
|
static: libmbedcrypto.a libmbedx509.a libmbedtls.a
|
||||||
|
cd ../tests && echo "This is a seedfile that contains 64 bytes (65 on Windows)......" > seedfile
|
||||||
|
|
||||||
|
shared: libmbedcrypto.$(DLEXT) libmbedx509.$(DLEXT) libmbedtls.$(DLEXT)
|
||||||
|
|
||||||
|
# Windows builds under Mingw can fail if make tries to create archives in the same
|
||||||
|
# directory at the same time - see https://bugs.launchpad.net/gcc-arm-embedded/+bug/1848002.
|
||||||
|
# This forces builds of the .a files to be serialised.
|
||||||
|
ifdef WINDOWS
|
||||||
|
libmbedtls.a: | libmbedx509.a
|
||||||
|
libmbedx509.a: | libmbedcrypto.a
|
||||||
|
endif
|
||||||
|
|
||||||
|
# tls
|
||||||
|
libmbedtls.a: $(OBJS_TLS)
|
||||||
|
echo " AR $@"
|
||||||
|
$(AR) $(ARFLAGS) $@ $(OBJS_TLS)
|
||||||
|
ifdef APPLE_BUILD
|
||||||
|
ifneq ($(APPLE_BUILD),0)
|
||||||
|
echo " RL $@"
|
||||||
|
$(RL) $(RLFLAGS) $@
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) libmbedx509.so
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS_TLS) -L. -lmbedx509 -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
|
ifneq ($(SOEXT_TLS),so)
|
||||||
|
libmbedtls.so: libmbedtls.$(SOEXT_TLS)
|
||||||
|
echo " LN $@ -> $<"
|
||||||
|
ln -sf $< $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
libmbedtls.dylib: $(OBJS_TLS) libmbedx509.dylib
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -dynamiclib -o $@ $(OBJS_TLS) -L. -lmbedx509 -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
|
libmbedtls.dll: $(OBJS_TLS) libmbedx509.dll
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_TLS) -lws2_32 -lwinmm -lgdi32 -L. -lmbedx509 -lmbedcrypto -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
|
# x509
|
||||||
|
libmbedx509.a: $(OBJS_X509)
|
||||||
|
echo " AR $@"
|
||||||
|
$(AR) $(ARFLAGS) $@ $(OBJS_X509)
|
||||||
|
ifdef APPLE_BUILD
|
||||||
|
ifneq ($(APPLE_BUILD),0)
|
||||||
|
echo " RL $@"
|
||||||
|
$(RL) $(RLFLAGS) $@
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
libmbedx509.$(SOEXT_X509): $(OBJS_X509) libmbedcrypto.so
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS_X509) -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
|
ifneq ($(SOEXT_X509),so)
|
||||||
|
libmbedx509.so: libmbedx509.$(SOEXT_X509)
|
||||||
|
echo " LN $@ -> $<"
|
||||||
|
ln -sf $< $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
libmbedx509.dylib: $(OBJS_X509) libmbedcrypto.dylib
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -dynamiclib -o $@ $(OBJS_X509) -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
|
libmbedx509.dll: $(OBJS_X509) libmbedcrypto.dll
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_X509) -lws2_32 -lwinmm -lgdi32 -L. -lmbedcrypto -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
|
# crypto
|
||||||
|
libmbedcrypto.a: $(OBJS_CRYPTO)
|
||||||
|
echo " AR $@"
|
||||||
|
$(AR) $(ARFLAGS) $@ $(OBJS_CRYPTO)
|
||||||
|
ifdef APPLE_BUILD
|
||||||
|
ifneq ($(APPLE_BUILD),0)
|
||||||
|
echo " RL $@"
|
||||||
|
$(RL) $(RLFLAGS) $@
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
libmbedcrypto.$(SOEXT_CRYPTO): $(OBJS_CRYPTO)
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS_CRYPTO) $(LOCAL_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
|
ifneq ($(SOEXT_CRYPTO),so)
|
||||||
|
libmbedcrypto.so: libmbedcrypto.$(SOEXT_CRYPTO)
|
||||||
|
echo " LN $@ -> $<"
|
||||||
|
ln -sf $< $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
libmbedcrypto.dylib: $(OBJS_CRYPTO)
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -dynamiclib -o $@ $(OBJS_CRYPTO) $(LOCAL_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
|
libmbedcrypto.dll: $(OBJS_CRYPTO)
|
||||||
|
echo " LD $@"
|
||||||
|
$(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_CRYPTO) -lws2_32 -lwinmm -lgdi32 -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
echo " CC $<"
|
||||||
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
|
.PHONY: generated_files
|
||||||
|
GENERATED_FILES = \
|
||||||
|
error.c version_features.c \
|
||||||
|
ssl_debug_helpers_generated.c \
|
||||||
|
psa_crypto_driver_wrappers.c
|
||||||
|
generated_files: $(GENERATED_FILES)
|
||||||
|
|
||||||
|
error.c: ../scripts/generate_errors.pl
|
||||||
|
error.c: ../scripts/data_files/error.fmt
|
||||||
|
error.c: $(filter-out %config%,$(wildcard ../include/mbedtls/*.h))
|
||||||
|
error.c:
|
||||||
|
echo " Gen $@"
|
||||||
|
$(PERL) ../scripts/generate_errors.pl
|
||||||
|
|
||||||
|
ssl_debug_helpers_generated.c: ../scripts/generate_ssl_debug_helpers.py
|
||||||
|
ssl_debug_helpers_generated.c: $(filter-out %config%,$(wildcard ../include/mbedtls/*.h))
|
||||||
|
ssl_debug_helpers_generated.c:
|
||||||
|
echo " Gen $@"
|
||||||
|
$(PYTHON) ../scripts/generate_ssl_debug_helpers.py --mbedtls-root .. .
|
||||||
|
|
||||||
|
version_features.c: ../scripts/generate_features.pl
|
||||||
|
version_features.c: ../scripts/data_files/version_features.fmt
|
||||||
|
## The generated file only depends on the options that are present in mbedtls_config.h,
|
||||||
|
## not on which options are set. To avoid regenerating this file all the time
|
||||||
|
## when switching between configurations, don't declare mbedtls_config.h as a
|
||||||
|
## dependency. Remove this file from your working tree if you've just added or
|
||||||
|
## removed an option in mbedtls_config.h.
|
||||||
|
#version_features.c: ../include/mbedtls/mbedtls_config.h
|
||||||
|
version_features.c:
|
||||||
|
echo " Gen $@"
|
||||||
|
$(PERL) ../scripts/generate_features.pl
|
||||||
|
|
||||||
|
psa_crypto_driver_wrappers.c: ../scripts/generate_driver_wrappers.py
|
||||||
|
psa_crypto_driver_wrappers.c: ../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja
|
||||||
|
psa_crypto_driver_wrappers.c:
|
||||||
|
echo " Gen $@"
|
||||||
|
$(PYTHON) ../scripts/generate_driver_wrappers.py
|
||||||
|
|
||||||
|
clean:
|
||||||
|
ifndef WINDOWS
|
||||||
|
rm -f *.o libmbed*
|
||||||
|
rm -f $(THIRDPARTY_CRYPTO_OBJECTS)
|
||||||
|
else
|
||||||
|
if exist *.o del /Q /F *.o
|
||||||
|
if exist libmbed* del /Q /F libmbed*
|
||||||
|
del /Q /F del_errors_out_if_the_file_list_is_empty_but_not_if_a_file_does_not_exist $(subst /,\,$(THIRDPARTY_CRYPTO_OBJECTS))
|
||||||
|
endif
|
||||||
|
|
||||||
|
neat: clean
|
||||||
|
ifndef WINDOWS
|
||||||
|
rm -f $(GENERATED_FILES)
|
||||||
|
else
|
||||||
|
for %f in ($(subst /,\,$(GENERATED_FILES))) if exist %f del /Q /F %f
|
||||||
|
endif
|
||||||
@@ -588,6 +588,25 @@ 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!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1889,8 +1889,6 @@ 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) {
|
||||||
|
|||||||
@@ -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,6 +137,18 @@ 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,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -234,8 +246,127 @@ 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
|
||||||
@@ -1006,7 +1137,12 @@ 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: %x, %x, %x, %x,%x\r\n",id,p_sensor_ident->id,u8SensorwriteID,u8SensorreadID,p_sensor_ident->id_reg);
|
os_printf("SID: id=0x%02x expect=0x%02x addr8={0x%02x,0x%02x} addr7=0x%02x reg=0x%02x\r\n",
|
||||||
|
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
|
||||||
@@ -1032,15 +1168,22 @@ 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)
|
||||||
{
|
{
|
||||||
os_printf("id =%x num:%d \n",devSensorInitTable[i]->id,i);
|
|
||||||
devSensorInit = (_Sensor_Ident_ *) devSensorInitTable[i];
|
devSensorInit = (_Sensor_Ident_ *) devSensorInitTable[i];
|
||||||
//#if CMOS_AUTO_LOAD
|
devSensor_Struct= (_Sensor_Adpt_ *) devSensorOPTable[i];
|
||||||
// devSensor_Struct = sensor_adpt_load(devSensorInit->id,devSensorInit->w_cmd,devSensorInit->r_cmd,init_buf);
|
|
||||||
//#else
|
// New, more informative line:
|
||||||
devSensor_Struct = (_Sensor_Adpt_ *) devSensorOPTable[i];
|
os_printf("sensor driver match: name=%s id=0x%02x num=%d addr7=0x%02x mclk=%d pix=%dx%d\r\n",
|
||||||
//#endif
|
devSensorNameTable[i],
|
||||||
|
devSensorInit->id,
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
@@ -1118,7 +1261,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){
|
||||||
@@ -1631,9 +1774,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 6M\r\n");
|
os_printf("iic init finish,sensor reset & set sensor clk into 8M\r\n");
|
||||||
//2:init sensor
|
//2:init sensor
|
||||||
dvp_set_baudrate(dvp_test,6000000);
|
dvp_set_baudrate(dvp_test,8000000);
|
||||||
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");
|
||||||
@@ -1817,11 +1960,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,50,36);
|
vpp_set_water0_locate(vpp_test,0,0);
|
||||||
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(2222,22,22,22,22,22);
|
set_time_watermark(0000,00,00,00,00,00);
|
||||||
vpp_set_water0_rc(vpp_test,0);
|
vpp_set_water0_rc(vpp_test,0);
|
||||||
|
|
||||||
|
|
||||||
@@ -1861,8 +2004,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,1);
|
vpp_set_watermark0_enable(vpp_test,0);
|
||||||
vpp_set_watermark1_enable(vpp_test,1);
|
vpp_set_watermark1_enable(vpp_test,0);
|
||||||
|
|
||||||
#if IPF_EN
|
#if IPF_EN
|
||||||
// vpp_set_ifp_en(vpp_test,1);
|
// vpp_set_ifp_en(vpp_test,1);
|
||||||
@@ -1905,8 +2048,3 @@ bool csi_open(){
|
|||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
gcc
|
||||||
Binary file not shown.
Reference in New Issue
Block a user