This commit is contained in:
liulin 2024-04-18 09:51:14 +08:00
commit ca3f2d2dcf
15 changed files with 56 additions and 7 deletions

View File

@ -46734,7 +46734,7 @@ BF3AF7FF
000D2E20
47F0E92D
F64AB086
271131E7
271231E7
F6C0A067
F44F010A
230462FD

View File

@ -71302,7 +71302,7 @@
0x0809fa38: e92d47f0 -..G PUSH {r4-r10,lr}
0x0809fa3c: b086 .. SUB sp,sp,#0x18
0x0809fa3e: f64a31e7 J..1 MOV r1,#0xabe7
0x0809fa42: 2711 .' MOVS r7,#0x11
0x0809fa42: 2712 .' MOVS r7,#0x12
0x0809fa44: a067 g. ADR r0,{pc}+0x1a0 ; 0x809fbe4
0x0809fa46: f6c0010a .... MOVT r1,#0x80a
0x0809fa4a: f44f62fd O..b MOV r2,#0x7e8

View File

@ -15,6 +15,7 @@
#include "fr_device_pa.h"
#include "fr_device_encode.h"
#include "fr_device_vbat.h"
#include "mx_config.h"
#if PRJ_NUM == A36
#include "A36_app.h"

View File

@ -2,6 +2,8 @@
/* 2024.04.08 by hsp */
/* *********************************************************** */
#include "app_task.h"
#include "mx_config.h"
#if PRJ_NUM == A36
#include <string.h>
@ -19,8 +21,13 @@
#include "driver_pwm.h"
#include "fr_device_rtc.h"
//#include "app_task.h"
#if PRJ_NUM == A36
#include "A36_app.h"
#elif PRJ_NUM == A39
#include "A39_app.h"
#endif
//#include "mycrc.h"
#include "app_lvgl.h"
#include "app_ble.h"

View File

@ -6,3 +6,12 @@ driver 封装的通用接口 例如spi 串口
pack 协议封装
parser 协议解析 包括协议解析和封装解析
store 存储 多应用的系统函数(发电机/摩托车仪表)
2024.04.18 新增补充
1.mx_task_run()函数为入口函数 3092系列入口放置再app_task.c中app_task任务中
2.新增 mx_config.h 作为最大的宏开关配置文件
FR3092_MXC_A36 作为控制A36项目开关
FR3092_MXC_A39 作为控制A39项目开关
宏当前已做存储结构区分
3.相关函数中的任务创建等功能文件中有相关注释供参考

View File

@ -4,6 +4,7 @@
#include "mx_uart.h"
#include "mx_map.h"
#include "mx_types.h"
#include "mx_config.h"
Map myMap = {0};

View File

@ -10,6 +10,7 @@
#include "mx_parser.h"
#include "mx_store.h"
#include "mx_types.h"
#include "mx_config.h"
uint8_t uart_id = 1; //串口ID
uint32_t uart_baud = 115200; //串口波特率

View File

@ -0,0 +1,22 @@
#ifndef _MX_CONFIG_H
#define _MX_CONFIG_H
#define FR3092_MXC_A36 1
#define FR3092_MXC_A39 0
#if FR3092_MXC_A36
#define PRJ_NUM A36
//摩托车仪表存储结构体宏
#define STORE_INSTRUMENT 1
#elif FR3092_MXC_A39
#define PRJ_NUM A39
//发电机存储结构体宏
#define STORE_ALTERNATOR 1
#else
#endif
#endif // _MX_CONFIG_H

View File

@ -2,6 +2,7 @@
#include <string.h>
#include "mx_store.h"
#include "mx_alternator_data.h"
#include "mx_config.h"
extern Store_t user_data;
@ -483,5 +484,10 @@ void setStoreOilMalfunction(uint8_t value)
user_data.ErrorCode.mOilMalfunction = value;
}
}
#elif STORE_INSTRUMENT
#else
#endif

View File

@ -6,6 +6,7 @@
//#include "uart.h"
#include <stdio.h>
#include <stdint.h>
#include "mx_config.h"
#if STORE_ALTERNATOR
//累计时间
@ -137,6 +138,10 @@ void setStoreOverVoltProtect(uint8_t value);
//机油故障
uint8_t getStoreOilMalfunction(void);
void setStoreOilMalfunction(uint8_t value);
#elif STORE_INSTRUMENT
#else
#endif

View File

@ -2,6 +2,7 @@
#include <string.h>
#include "mx_store.h"
#include "mx_alternator_data.h"
#include "mx_config.h"
Store_t user_data;

View File

@ -6,11 +6,7 @@
//#include "uart.h"
#include <stdio.h>
#include <stdint.h>
//发电机存储结构体宏
#define STORE_ALTERNATOR 0
//摩托车仪表存储结构体宏
#define STORE_INSTRUMENT 0
#include "mx_config.h"
#if STORE_ALTERNATOR
//存放所有故障代码