initial commit
This commit is contained in:
4
project/buildinfo.h
Executable file
4
project/buildinfo.h
Executable file
@@ -0,0 +1,4 @@
|
||||
/* this file is automatically generated: don't edit */
|
||||
#define PROJECT_NAME "fusion"
|
||||
#define PROJECT_VERSTION "0.0.1"
|
||||
#define BUILDTIME "Jul 26 2024 - 12:14:09"
|
||||
111
project/project.mk
Executable file
111
project/project.mk
Executable file
@@ -0,0 +1,111 @@
|
||||
#################################################
|
||||
# CONFIG generate > hal/hal_product_config.h #
|
||||
#################################################
|
||||
|
||||
export MOD_SENSOR=GC2053
|
||||
export MOD_WIFI=atbm6441
|
||||
export MOD_SDCARD=1
|
||||
export MOD_AUDIO=t40
|
||||
export MOD_VIDEO=t40
|
||||
export MOD_BATTERY=atbm6441
|
||||
export MOD_IRCUT=t40
|
||||
export MOD_LIGHTSENSOR=t40
|
||||
export MOD_KEYPAD=atbm6441
|
||||
export MOD_GPIO=t40
|
||||
export MOD_IRLED=t40
|
||||
export MOD_WATCHDOG=atbm6441
|
||||
export MOD_FLASH=linux #linux_nor
|
||||
export MOD_STORAGE_PATH='STORAGE_PATH=\"/home/share/primary/fusion\"'
|
||||
|
||||
export GPIO_IRCUT_ENB=10
|
||||
export GPIO_IRCUT_FBC=11
|
||||
export GPIO_IRLED=13
|
||||
|
||||
include $(HAL_DIR)/hal_env/config.mk
|
||||
|
||||
#################################################
|
||||
# MOD #
|
||||
#################################################
|
||||
|
||||
ifdef MOD_AUDIO
|
||||
include $(HAL_DIR)/hal_audio/config.mk
|
||||
CFLAGS += -DMOD_AUDIO
|
||||
endif
|
||||
|
||||
ifdef MOD_VIDEO
|
||||
include $(HAL_DIR)/hal_video/config.mk
|
||||
CFLAGS += -DMOD_VIDEO
|
||||
endif
|
||||
|
||||
ifdef MOD_BATTERY
|
||||
include $(HAL_DIR)/hal_battery/config.mk
|
||||
CFLAGS += -DMOD_BATTERY
|
||||
endif
|
||||
|
||||
ifdef MOD_IRCUT
|
||||
#include $(APP_DIR)/app_ircut/config.mk
|
||||
include $(HAL_DIR)/hal_ircut/config.mk
|
||||
CFLAGS += -DMOD_IRCUT
|
||||
endif
|
||||
|
||||
ifdef MOD_LIGHTSENSOR
|
||||
include $(HAL_DIR)/hal_lightsensor/config.mk
|
||||
CFLAGS += -DMOD_LIGHTSENSOR
|
||||
endif
|
||||
|
||||
ifdef MOD_KEYPAD
|
||||
include $(HAL_DIR)/hal_keypad/config.mk
|
||||
CFLAGS += -DMOD_KEYPAD
|
||||
endif
|
||||
|
||||
ifdef MOD_GPIO
|
||||
include $(HAL_DIR)/hal_gpio/config.mk
|
||||
CFLAGS += -DMOD_GPIO
|
||||
endif
|
||||
|
||||
ifdef MOD_IRLED
|
||||
include $(HAL_DIR)/hal_irled/config.mk
|
||||
CFLAGS += -DMOD_IRLED
|
||||
endif
|
||||
|
||||
ifdef MOD_WATCHDOG
|
||||
include $(HAL_DIR)/hal_watchdog/config.mk
|
||||
CFLAGS += -DMOD_WATCHDOG
|
||||
endif
|
||||
|
||||
ifdef MOD_FLASH
|
||||
include $(HAL_DIR)/hal_flash/config.mk
|
||||
CFLAGS += -DMOD_FLASH
|
||||
endif
|
||||
|
||||
ifdef MOD_WIFI
|
||||
include $(HAL_DIR)/hal_wifi/config.mk
|
||||
CFLAGS += -DMOD_WIFI
|
||||
endif
|
||||
|
||||
|
||||
ifdef MOD_MCU
|
||||
include $(HAL_DIR)/hal_mcu/config.mk
|
||||
CFLAGS += -DMOD_MCU
|
||||
endif
|
||||
|
||||
include $(APP_DIR)/config.mk
|
||||
|
||||
ifdef MOD_MCU
|
||||
include $(PROJECT_DIR)/unittest/config.mk
|
||||
CFLAGS += -DMOD_MCU
|
||||
endif
|
||||
|
||||
|
||||
HEADERS += $(PROJECT_DIR)/*.h
|
||||
|
||||
SRCDIRS += $(PROJECT_DIR)
|
||||
|
||||
|
||||
LIBHV_HEADERS += $(HEADERS)
|
||||
CORE_SRCDIRS += $(SRCDIRS)
|
||||
|
||||
|
||||
#################################################
|
||||
# auto generate > hal_product_config.h #
|
||||
#################################################
|
||||
4
project/project_config.c
Executable file
4
project/project_config.c
Executable file
@@ -0,0 +1,4 @@
|
||||
#include "project_config.h"
|
||||
|
||||
|
||||
|
||||
55
project/project_config.h
Executable file
55
project/project_config.h
Executable file
@@ -0,0 +1,55 @@
|
||||
#ifndef __PROJECT_CONFIG_INCLUDED__
|
||||
#define __PROJECT_CONFIG_INCLUDED__
|
||||
/*************************************************************************
|
||||
> File Name: project_config
|
||||
> Author: amir
|
||||
> Created Time: 2021-11-18
|
||||
************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MAX_VFRAME_SIZE ((uint32_t)(524288))//512*1024
|
||||
#define MAX_AFRAME_SIZE ((uint32_t)(65536))//64*1024
|
||||
|
||||
/*******************************************************************************************/
|
||||
|
||||
typedef enum{
|
||||
EVENT_HANDSHAKE = 0, //0 host->slave->host, host send msg to salve and wait for slave's reply(carry data maybe)
|
||||
EVENT_CMD_DATA, //1 host->slave->host, host send msg to salve and wait for slave's reply(carry data maybe)
|
||||
EVENT_NET_DATA, //2 host->slave->host, host send msg to salve and wait for slave's reply(carry data maybe)
|
||||
EVENT_NOTIFY_CMD_DATA, //3 slave->host->slave, a host special task wait for slave's msg to recv data and reply ack to slave
|
||||
EVENT_NOTIFY_NET_DATA, //4 slave->host->slave, a host special task wait for slave's msg to recv data and reply ack to slave
|
||||
|
||||
EVENT_HAL_START = 10,
|
||||
EVENT_HAL_PIR, //11
|
||||
EVENT_HAL_GSENSOR, //12
|
||||
EVENT_HAL_TEMPSENSOR, //13
|
||||
EVENT_HAL_LOCK, //14
|
||||
EVENT_HAL_BATTERY, //15
|
||||
EVENT_HAL_DAYNIGHT, //16 IRCUT_DAY(1)|IRCUT_NIGHT(0)|IRCUT_UNKNOWN(2)
|
||||
EVENT_HAL_KEYPAD, //17
|
||||
EVENT_HAL_PMU, //18
|
||||
EVENT_HAL_WIFI, //19
|
||||
EVENT_HAL_SOURNDWAVE, //20
|
||||
EVENT_HAL_LIGHTSENSOR, //21
|
||||
|
||||
EVENT_PAL_START = 70,
|
||||
EVENT_PAL_SUSPEND,
|
||||
|
||||
EVENT_APP_START = 0x1FF,
|
||||
|
||||
EVENT_OTHER = 0x2FF,
|
||||
EVENT_OTHER_LOGFILE ,
|
||||
}MMC_EVENT;
|
||||
|
||||
const char *mmc_event_name(int32_t event);
|
||||
|
||||
typedef enum{
|
||||
IRCUT_UNKNOWN = 2,
|
||||
IRCUT_DAY = 1, //1 for day to filter IR light (with ir-filter(red or blue) glass)
|
||||
IRCUT_NIGHT = 0, //0 for night to unfilter all light (with transparent glass)
|
||||
}IRCUT_MODE;
|
||||
|
||||
|
||||
#endif //__PROJECT_CONFIG_INCLUDED__
|
||||
|
||||
2
project/unittest/config.mk
Executable file
2
project/unittest/config.mk
Executable file
@@ -0,0 +1,2 @@
|
||||
SRC += $(wildcard $(PROJECT_DIR)/unittest/*.c)
|
||||
CFLAGS += -I$(PROJECT_DIR)/unittest
|
||||
68
project/unittest/unittest_main.c
Executable file
68
project/unittest/unittest_main.c
Executable file
@@ -0,0 +1,68 @@
|
||||
/*************************************************
|
||||
File name : workqueue.h
|
||||
Module :
|
||||
Author : amir
|
||||
Version : 0.1
|
||||
Created on : 2022-02-07
|
||||
Description :
|
||||
Data structure and function definitions required by the socket interface
|
||||
|
||||
Modify History:
|
||||
1. Date: Author: Modification:
|
||||
*************************************************/
|
||||
#include <stdlib.h>
|
||||
#include "mw_unittest.h"
|
||||
#include "util.h"
|
||||
#include "hlog.h"
|
||||
#include "mw_ut_config.h"
|
||||
#include "hal_interface_gpio.h"
|
||||
|
||||
|
||||
|
||||
static int32_t unittest_media(int32_t argc, char **argv)
|
||||
{
|
||||
hlogi("%s argc:%u", __func__, argc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int32_t unittest_main(int32_t argc, char **argv)
|
||||
{
|
||||
hlogi("%s argc:%u", __func__, argc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
unittest_cmd g_ut_cmd_device[] =
|
||||
{
|
||||
DECLAR_UT_CMD(NULL, g_ut_cmd_gpio, "gpio", "output or input"),
|
||||
};
|
||||
|
||||
|
||||
unittest_cmd g_ut_cmd_media[] =
|
||||
{
|
||||
DECLAR_UT_CMD(unittest_media, NULL, "debug", "No Param"),
|
||||
};
|
||||
|
||||
|
||||
/* ***** Unittest Cmd Table ***** */
|
||||
unittest_cmd unittest_list[] =
|
||||
{
|
||||
DECLAR_UT_CMD(unittest_main, NULL, "main", "main"),
|
||||
DECLAR_UT_CMD(NULL, g_ut_cmd_media, "media", "media debug"),
|
||||
DECLAR_UT_CMD(NULL, g_ut_cmd_device, "device", "gpio"),
|
||||
DECLAR_UT_CMD(NULL, g_ut_cmd_config, "config", "config UT"),
|
||||
|
||||
};
|
||||
|
||||
|
||||
int32_t unittest_get(unittest_cmd **cmds){
|
||||
*cmds = unittest_list;
|
||||
return sizeof(unittest_list)/sizeof(unittest_cmd);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
1. 根据不同的平台,注册到 shell
|
||||
Shell_CommandRegister("ut", unittest);
|
||||
*/
|
||||
|
||||
6
project/unittest/unittest_main.h
Executable file
6
project/unittest/unittest_main.h
Executable file
@@ -0,0 +1,6 @@
|
||||
#ifndef __UNITEST_MAIN_H__
|
||||
#define __UNITEST_MAIN_H__
|
||||
#include "mw_unittest.h"
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user