Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
时昊
haoJin750TFT
Commits
4173f025
Commit
4173f025
authored
Nov 26, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎈
perf:添加数组和结构体的四字节对齐
parent
3b42f2ea
Changes
30
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
56 additions
and
38 deletions
+56
-38
BackLight.c
Firmware/Source/Application/BackLight.c
+4
-1
BlueTooth.c
Firmware/Source/Application/BlueTooth.c
+3
-0
BlueTooth.h
Firmware/Source/Application/BlueTooth.h
+2
-1
Can_User.h
Firmware/Source/Application/Can_User.h
+1
-1
Data_Fuel.c
Firmware/Source/Application/Data_Fuel.c
+1
-0
Hysteresis.h
Firmware/Source/Application/Hysteresis.h
+3
-3
MCU_Core_Protocol.c
Firmware/Source/Application/MCU_Core_Protocol.c
+2
-2
Protocol_CRC16.c
Firmware/Source/Application/Protocol_CRC16.c
+2
-0
Protocol_Lib.h
Firmware/Source/Application/Protocol_Lib.h
+2
-2
Protocol_User.c
Firmware/Source/Application/Protocol_User.c
+4
-2
AMT630H.c
Firmware/Source/Component/AMT630H/AMT630H.c
+1
-0
AMT630H.h
Firmware/Source/Component/AMT630H/AMT630H.h
+1
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+1
-0
Analog_Circuits.h
Firmware/Source/Component/Analog/Analog_Circuits.h
+1
-1
CAN_Lib.h
Firmware/Source/Component/CAN_Signal/CAN_Lib.h
+7
-7
eepromManage.h
Firmware/Source/Component/Eeprom/eepromManage.h
+1
-1
Key_user.h
Firmware/Source/Component/Key/Key_user.h
+2
-2
Line_In.h
Firmware/Source/Component/Line_In/Line_In.h
+1
-1
PowerManagement.h
Firmware/Source/Component/PowerManagement/PowerManagement.h
+1
-1
Simulated_IIC_master.h
...rce/Component/Simulated_IIC_master/Simulated_IIC_master.h
+1
-1
System_Monitor.h
Firmware/Source/Component/System_Monitor/System_Monitor.h
+1
-1
Telltales_Lib.h
Firmware/Source/Component/Telltales/Telltales_Lib.h
+2
-2
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+2
-0
RTE_GPIO.h
...are/Source/Device/Cmsemicon/BAT32A279/RTE/GPIO/RTE_GPIO.h
+1
-1
RTE_RTC.h
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/RTC/RTE_RTC.h
+1
-1
RTE_TIM40.c
...e/Source/Device/Cmsemicon/BAT32A279/RTE/Tim40/RTE_TIM40.c
+2
-1
TrmerM.c
...are/Source/Device/Cmsemicon/BAT32A279/RTE/TrmerM/TrmerM.c
+1
-1
RTE_UART.c
...are/Source/Device/Cmsemicon/BAT32A279/RTE/UART/RTE_UART.c
+2
-1
RTE_UART.h
...are/Source/Device/Cmsemicon/BAT32A279/RTE/UART/RTE_UART.h
+1
-1
Sys_Scheduler_Lib.c
Firmware/Source/System/Sys_Scheduler_Lib.c
+2
-2
No files found.
Firmware/Source/Application/BackLight.c
View file @
4173f025
...
@@ -10,8 +10,9 @@ Light_uint16_t LightR_Status = 0;
...
@@ -10,8 +10,9 @@ Light_uint16_t LightR_Status = 0;
Light_uint16_t
LightR_Status_NCount
=
0u
;
Light_uint16_t
LightR_Status_NCount
=
0u
;
Light_uint16_t
LightR_Status_DCount
=
0u
;
Light_uint16_t
LightR_Status_DCount
=
0u
;
Light_uint8_t
NtcDataCount
;
Light_uint8_t
NtcDataCount
;
__align
(
4
)
/* 四字节对齐 */
Light_uint16_t
NtcData
[
LIGHT_DATA_NUM
]
=
{
0
};
Light_uint16_t
NtcData
[
LIGHT_DATA_NUM
]
=
{
0
};
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint8_t
u8Lvl
;
uint8_t
u8Lvl
;
uint8_t
Pos_Lamp_Sts
;
uint8_t
Pos_Lamp_Sts
;
...
@@ -81,6 +82,7 @@ void BackLight_Back_PWM_Init(void)
...
@@ -81,6 +82,7 @@ void BackLight_Back_PWM_Init(void)
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
}
}
__align
(
4
)
/* 四字节对齐 */
uint16_t
NTCDegreesBoard
[]
=
uint16_t
NTCDegreesBoard
[]
=
{
{
550
,
550
,
...
@@ -95,6 +97,7 @@ uint16_t NTCDegreesBoard[] =
...
@@ -95,6 +97,7 @@ uint16_t NTCDegreesBoard[] =
1000
,
1000
,
};
};
__align
(
4
)
/* 四字节对齐 */
uint16_t
NTCResBoard
[]
=
uint16_t
NTCResBoard
[]
=
{
{
27091
,
27091
,
...
...
Firmware/Source/Application/BlueTooth.c
View file @
4173f025
...
@@ -12,6 +12,8 @@ uint8_t LastCurIgnSt = POWER_STATE_IGN_OFF;
...
@@ -12,6 +12,8 @@ uint8_t LastCurIgnSt = POWER_STATE_IGN_OFF;
uint8_t
IOState
=
0
;
uint8_t
IOState
=
0
;
_PICID_Struct
PicObj
;
_PICID_Struct
PicObj
;
_QRCODE_RECT
QRCode_Rect
;
_QRCODE_RECT
QRCode_Rect
;
__align
(
4
)
/* 四字节对齐 */
const
uint8_t
HJBlueToothName
[
9
]
=
{
"HJ750"
};
const
uint8_t
HJBlueToothName
[
9
]
=
{
"HJ750"
};
uint8_t
UUIDConfigBuf
[
21
]
=
{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
};
uint8_t
UUIDConfigBuf
[
21
]
=
{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
};
//007502024092400000002
//007502024092400000002
...
@@ -204,6 +206,7 @@ TEXT_STRUCT TextPara[TEXT_NUM_TOTAL] =
...
@@ -204,6 +206,7 @@ TEXT_STRUCT TextPara[TEXT_NUM_TOTAL] =
};
};
__align
(
4
)
/* 四字节对齐 */
uint8_t
PhoneNumber
[
40
];
uint8_t
PhoneNumber
[
40
];
uint8_t
LastPhoneNumber
[
20
];
uint8_t
LastPhoneNumber
[
20
];
uint8_t
LastBlueToothPhoneName
[
100
];
uint8_t
LastBlueToothPhoneName
[
100
];
...
...
Firmware/Source/Application/BlueTooth.h
View file @
4173f025
...
@@ -17,7 +17,8 @@ typedef enum {
...
@@ -17,7 +17,8 @@ typedef enum {
TEXT_NUM_TOTAL
,
TEXT_NUM_TOTAL
,
}
TEXT_NUM_ENUM
;
}
TEXT_NUM_ENUM
;
typedef
struct
{
typedef
struct
__attribute__
((
aligned
(
4
)))
{
TEXT_NUM_ENUM
TextNum
;
TEXT_NUM_ENUM
TextNum
;
uint16_t
LableNum
;
uint16_t
LableNum
;
uint16_t
Vaild
;
uint16_t
Vaild
;
...
...
Firmware/Source/Application/Can_User.h
View file @
4173f025
...
@@ -21,7 +21,7 @@ Bus-off
...
@@ -21,7 +21,7 @@ Bus-off
#define RSCAN0_BUS_OFF_LV1_RECOVERY_TIME 90U
#define RSCAN0_BUS_OFF_LV1_RECOVERY_TIME 90U
#define RSCAN0_BUS_OFF_LV2_RECOVERY_TIME 1000U
#define RSCAN0_BUS_OFF_LV2_RECOVERY_TIME 1000U
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint8_t
Status
;
uint8_t
Status
;
uint8_t
Timer
;
uint8_t
Timer
;
...
...
Firmware/Source/Application/Data_Fuel.c
View file @
4173f025
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#define FUEL_SEG_UP 0u
#define FUEL_SEG_UP 0u
#define FUEL_SEG_DOWN 1u
#define FUEL_SEG_DOWN 1u
__align
(
4
)
/* 四字节对齐 */
uint16_t
g_u16FuelData
[
FUEL_DATA_NUM
];
uint16_t
g_u16FuelData
[
FUEL_DATA_NUM
];
uint8_t
g_u8FuelDataCount
=
0u
;
uint8_t
g_u8FuelDataCount
=
0u
;
...
...
Firmware/Source/Application/Hysteresis.h
View file @
4173f025
...
@@ -32,14 +32,14 @@ typedef enum
...
@@ -32,14 +32,14 @@ typedef enum
HYS_OPERATE_SUCCESS
=
0UL
,
/*函数操作成功*/
HYS_OPERATE_SUCCESS
=
0UL
,
/*函数操作成功*/
HYS_OPERATE_FAIL
,
/*函数操作失败*/
HYS_OPERATE_FAIL
,
/*函数操作失败*/
}
HYS_Operate_Type_en_t
;
}
HYS_Operate_Type_en_t
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
/*该段的下限值*/
/*该段的下限值*/
Hys_uint16_t
u16HYSSegLow
;
Hys_uint16_t
u16HYSSegLow
;
/*该段的上限值*/
/*该段的上限值*/
Hys_uint16_t
u16HYSSegHigh
;
Hys_uint16_t
u16HYSSegHigh
;
}
HYS_Seg_Table_st_t
;
}
HYS_Seg_Table_st_t
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
/*参数分段属性表*/
/*参数分段属性表*/
const
HYS_Seg_Table_st_t
*
pstHYSSegTable
;
const
HYS_Seg_Table_st_t
*
pstHYSSegTable
;
...
@@ -50,7 +50,7 @@ typedef struct
...
@@ -50,7 +50,7 @@ typedef struct
/*1U:正序 0U:降序*/
/*1U:正序 0U:降序*/
Hys_uint8_t
u8HYSSortBy
;
Hys_uint8_t
u8HYSSortBy
;
}
HYS_Attribute_st_t
;
}
HYS_Attribute_st_t
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
/*物理量数量,也就是 HYS_NUM_MAX */
/*物理量数量,也就是 HYS_NUM_MAX */
Hys_uint8_t
u8HYSNum
;
Hys_uint8_t
u8HYSNum
;
...
...
Firmware/Source/Application/MCU_Core_Protocol.c
View file @
4173f025
#include "MCU_Core_Protocol.h"
#include "MCU_Core_Protocol.h"
#include "Components.h"
#include "Components.h"
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint8_t
SOC_St
;
/*系统启动状态 0启动中 1启动成功 2启动超时*/
uint8_t
SOC_St
;
/*系统启动状态 0启动中 1启动成功 2启动超时*/
uint8_t
AnimStatus
;
uint8_t
AnimStatus
;
...
@@ -9,7 +9,7 @@ typedef struct
...
@@ -9,7 +9,7 @@ typedef struct
uint8_t
Restart
;
uint8_t
Restart
;
}
Core_Monitor_t
;
}
Core_Monitor_t
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint8_t
u8POPEn
;
uint8_t
u8POPEn
;
uint8_t
u8BlueToothEn
;
uint8_t
u8BlueToothEn
;
...
...
Firmware/Source/Application/Protocol_CRC16.c
View file @
4173f025
...
@@ -9,8 +9,10 @@
...
@@ -9,8 +9,10 @@
*/
*/
#include "Protocol_CRC16.h"
#include "Protocol_CRC16.h"
__align
(
4
)
/* 四字节对齐 */
static
const
Protocol_uint8_t
CRC16_TAB_H
[
256
]
=
{
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
};
static
const
Protocol_uint8_t
CRC16_TAB_H
[
256
]
=
{
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x01u
,
0xC0u
,
0x80u
,
0x41u
,
0x00u
,
0xC1u
,
0x81u
,
0x40u
,
0x00u
,
0xC1u
,
0x81u
,
0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u
,
0x93u
,
0x53u
,
0x52u
,
0x92u
,
0x96u
,
0x56u
,
0x57u
,
0x97u
,
0x55u
,
0x95u
,
0x94u
,
0x54u
,
0x9Cu
,
0x5Cu
,
0x5Du
,
0x9Du
,
0x5Fu
,
0x9Fu
,
0x9Eu
,
0x5Eu
,
0x5Au
,
0x9Au
,
0x9Bu
,
0x5Bu
,
0x99u
,
0x59u
,
0x58u
,
0x98u
,
0x88u
,
0x48u
,
0x49u
,
0x89u
,
0x4Bu
,
0x8Bu
,
0x8Au
,
0x4Au
,
0x4Eu
,
0x8Eu
,
0x8Fu
,
0x4Fu
,
0x8Du
,
0x4Du
,
0x4Cu
,
0x8Cu
,
0x44u
,
0x84u
,
0x85u
,
0x45u
,
0x87u
,
0x47u
,
0x46u
,
0x86u
,
0x82u
,
0x42u
,
0x43u
,
0x83u
,
0x41u
,
0x81u
,
0x80u
,
0x40u
};
/**
/**
...
...
Firmware/Source/Application/Protocol_Lib.h
View file @
4173f025
...
@@ -30,7 +30,7 @@ Platform_16Bit
...
@@ -30,7 +30,7 @@ Platform_16Bit
/**@struct Protocol_Data_t
/**@struct Protocol_Data_t
* @brief 解析后的协议数据
* @brief 解析后的协议数据
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
Protocol_uint8_t
FrameNo
;
/**< 帧序号 */
Protocol_uint8_t
FrameNo
;
/**< 帧序号 */
Protocol_uint8_t
PowerSts
;
/**< 电源状态 */
Protocol_uint8_t
PowerSts
;
/**< 电源状态 */
...
@@ -49,7 +49,7 @@ typedef void (*UARTClose)(void);
...
@@ -49,7 +49,7 @@ typedef void (*UARTClose)(void);
/**@struct Protocol_Func_t
/**@struct Protocol_Func_t
* @brief 协议解析回调函数
* @brief 协议解析回调函数
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
UARTOpen
UARTOpen_Cbk
;
/**< 串口打开回调 */
UARTOpen
UARTOpen_Cbk
;
/**< 串口打开回调 */
UARTSend
UARTSend_Cbk
;
/**< 串口发送回调 */
UARTSend
UARTSend_Cbk
;
/**< 串口发送回调 */
...
...
Firmware/Source/Application/Protocol_User.c
View file @
4173f025
...
@@ -6,14 +6,14 @@
...
@@ -6,14 +6,14 @@
#define UART_RX_MAX_DEPTH (2 * 1024UL) // 4K
#define UART_RX_MAX_DEPTH (2 * 1024UL) // 4K
#define UART_DATA_BUF_LEN (2 * 1024UL) // 4K
#define UART_DATA_BUF_LEN (2 * 1024UL) // 4K
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
Protocol_uint32_t
read_pos
;
Protocol_uint32_t
read_pos
;
Protocol_uint32_t
write_pos
;
Protocol_uint32_t
write_pos
;
Protocol_uint8_t
Rx_Buffer
[
UART_RX_MAX_DEPTH
];
Protocol_uint8_t
Rx_Buffer
[
UART_RX_MAX_DEPTH
];
}
UARTRxBuf_t
;
}
UARTRxBuf_t
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
Protocol_uint32_t
read_pos
;
Protocol_uint32_t
read_pos
;
Protocol_uint32_t
write_pos
;
Protocol_uint32_t
write_pos
;
...
@@ -22,6 +22,8 @@ typedef struct
...
@@ -22,6 +22,8 @@ typedef struct
static
UARTRxBuf_t
UARTRxBuf
;
static
UARTRxBuf_t
UARTRxBuf
;
static
UARTTxBuf_t
UARTTxBuf
;
static
UARTTxBuf_t
UARTTxBuf
;
__align
(
4
)
/* 四字节对齐 */
static
Protocol_uint8_t
mDataBufPtr
[
UART_DATA_BUF_LEN
];
static
Protocol_uint8_t
mDataBufPtr
[
UART_DATA_BUF_LEN
];
static
Protocol_uint8_t
Protocol_OpenUart
(
void
);
static
Protocol_uint8_t
Protocol_OpenUart
(
void
);
...
...
Firmware/Source/Component/AMT630H/AMT630H.c
View file @
4173f025
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include "Components.h"
#include "Components.h"
#include "PicBin.h"
#include "PicBin.h"
#include "GpioUser.h"
#include "GpioUser.h"
__align
(
4
)
/* 四字节对齐 */
//#include "AMT630H_Datas.h"
//#include "AMT630H_Datas.h"
#define AMT630H_ERR_TIME 10000U
#define AMT630H_ERR_TIME 10000U
#define AMT630H_RELEASE_MODE 1U
#define AMT630H_RELEASE_MODE 1U
...
...
Firmware/Source/Component/AMT630H/AMT630H.h
View file @
4173f025
...
@@ -10,7 +10,7 @@ typedef enum
...
@@ -10,7 +10,7 @@ typedef enum
EM_FLASH_CHECK_RESULT_FAIL
,
EM_FLASH_CHECK_RESULT_FAIL
,
}
EM_FLASH_CHECK_RESULT_T
;
}
EM_FLASH_CHECK_RESULT_T
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint8_t
Flag
;
uint8_t
Flag
;
uint32_t
InquireTime
;
uint32_t
InquireTime
;
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
4173f025
#include "Components.h"
#include "Components.h"
__align
(
4
)
/* 四字节对齐 */
uint8_t
Pic_mode
=
PIC_DAYTIME_CH
;
uint8_t
Pic_mode
=
PIC_DAYTIME_CH
;
uint8_t
g_u8Display_Mode
=
ModeDAY
;
uint8_t
g_u8Display_Mode
=
ModeDAY
;
...
...
Firmware/Source/Component/Analog/Analog_Circuits.h
View file @
4173f025
...
@@ -22,7 +22,7 @@ extern {
...
@@ -22,7 +22,7 @@ extern {
#endif
#endif
/* Exported types ------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint32_t
u32Res1
;
uint32_t
u32Res1
;
uint32_t
u32Res2
;
uint32_t
u32Res2
;
...
...
Firmware/Source/Component/CAN_Signal/CAN_Lib.h
View file @
4173f025
...
@@ -58,7 +58,7 @@ typedef enum
...
@@ -58,7 +58,7 @@ typedef enum
* @brief 报文接收属性结构体 \n
* @brief 报文接收属性结构体 \n
* 定义报接收文属性
* 定义报接收文属性
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
canlib_uint8_t
Init_Aarry
[
8u
];
/**< 报文初始化值.默认加载,未收到报文时,buffer内为该值 */
canlib_uint8_t
Init_Aarry
[
8u
];
/**< 报文初始化值.默认加载,未收到报文时,buffer内为该值 */
canlib_uint8_t
TimeOut_Array
[
8u
];
/**< 报文掉线值.掉线后加载 */
canlib_uint8_t
TimeOut_Array
[
8u
];
/**< 报文掉线值.掉线后加载 */
...
@@ -74,7 +74,7 @@ typedef struct
...
@@ -74,7 +74,7 @@ typedef struct
* @brief 报文发送属性结构体 \n
* @brief 报文发送属性结构体 \n
* 定义发送报文属性
* 定义发送报文属性
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
canlib_uint32_t
u32MsgID
;
/**< 报文发送ID */
canlib_uint32_t
u32MsgID
;
/**< 报文发送ID */
canlib_uint32_t
u32MsgCycle
;
/**< 报文发送周期,单位是us */
canlib_uint32_t
u32MsgCycle
;
/**< 报文发送周期,单位是us */
...
@@ -91,7 +91,7 @@ typedef struct
...
@@ -91,7 +91,7 @@ typedef struct
* @brief 报文发送结构体 \n
* @brief 报文发送结构体 \n
* 定义报文发送结构的信息
* 定义报文发送结构的信息
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
canlib_uint32_t
MsgID
;
/**< 报文发送ID */
canlib_uint32_t
MsgID
;
/**< 报文发送ID */
canlib_uint8_t
MsgStd
;
/**< 报文发送标准帧/扩展帧 */
canlib_uint8_t
MsgStd
;
/**< 报文发送标准帧/扩展帧 */
...
@@ -106,7 +106,7 @@ typedef canlib_uint8_t (*HAL_CAN_Send)(st_CAN_Msg *Msg);
...
@@ -106,7 +106,7 @@ typedef canlib_uint8_t (*HAL_CAN_Send)(st_CAN_Msg *Msg);
* @brief 内部使用 \n
* @brief 内部使用 \n
* 内容不明
* 内容不明
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
canlib_uint8_t
AnalyzeMsg
[
8u
];
canlib_uint8_t
AnalyzeMsg
[
8u
];
canlib_uint8_t
ReceiveBuf
[
8u
];
canlib_uint8_t
ReceiveBuf
[
8u
];
...
@@ -120,7 +120,7 @@ typedef struct
...
@@ -120,7 +120,7 @@ typedef struct
* @brief 内部使用,不做讲解 \n
* @brief 内部使用,不做讲解 \n
* 内部使用,不做讲解
* 内部使用,不做讲解
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
st_CANMsgStruct
*
CAN_MSG_Analysis
;
st_CANMsgStruct
*
CAN_MSG_Analysis
;
const
st_CANMsgAttribute
*
pAttrubute
;
const
st_CANMsgAttribute
*
pAttrubute
;
...
@@ -131,7 +131,7 @@ typedef struct
...
@@ -131,7 +131,7 @@ typedef struct
* @brief 内部使用,不做讲解 \n
* @brief 内部使用,不做讲解 \n
* 内部使用,不做讲解
* 内部使用,不做讲解
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
canlib_uint32_t
u32MsgID
;
canlib_uint32_t
u32MsgID
;
canlib_uint32_t
u32Timer
;
canlib_uint32_t
u32Timer
;
...
@@ -149,7 +149,7 @@ typedef struct
...
@@ -149,7 +149,7 @@ typedef struct
* @brief 内部使用,不做讲解 \n
* @brief 内部使用,不做讲解 \n
* 内部使用,不做讲解
* 内部使用,不做讲解
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
const
st_CAN_SendAttribute
*
pCAN_SendAttribute
;
const
st_CAN_SendAttribute
*
pCAN_SendAttribute
;
st_CAN_SendOperation
*
CanMsg
;
st_CAN_SendOperation
*
CanMsg
;
...
...
Firmware/Source/Component/Eeprom/eepromManage.h
View file @
4173f025
...
@@ -36,7 +36,7 @@ typedef enum
...
@@ -36,7 +36,7 @@ typedef enum
AT24C16
=
16
,
AT24C16
=
16
,
}
DeviceNo_t
;
}
DeviceNo_t
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
ee_uint32_t
Odo
;
ee_uint32_t
Odo
;
ee_uint32_t
Trip
;
ee_uint32_t
Trip
;
...
...
Firmware/Source/Component/Key/Key_user.h
View file @
4173f025
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include "common.h"
#include "common.h"
#include "rtc.h"
#include "rtc.h"
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint16_t
Back_Time_Left
;
uint16_t
Back_Time_Left
;
uint16_t
Back_Time_Right
;
uint16_t
Back_Time_Right
;
...
@@ -30,7 +30,7 @@ typedef enum
...
@@ -30,7 +30,7 @@ typedef enum
BackLight_Val_A
,
BackLight_Val_A
,
}
_BackLight_Val_Type
;
}
_BackLight_Val_Type
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint16_t
Back_Time_Left
;
uint16_t
Back_Time_Left
;
uint16_t
Back_Time_Right
;
uint16_t
Back_Time_Right
;
...
...
Firmware/Source/Component/Line_In/Line_In.h
View file @
4173f025
...
@@ -33,7 +33,7 @@ typedef Linelib_uint16_t (*LineIn_GetPowerMode)(void);
...
@@ -33,7 +33,7 @@ typedef Linelib_uint16_t (*LineIn_GetPowerMode)(void);
* @brief 硬线去抖属性结构体 \n
* @brief 硬线去抖属性结构体 \n
* 定义报接收文属性
* 定义报接收文属性
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
Linelib_uint8_t
DefaultLevel
;
/**< 初始电平 LEVEL_LOW /LEVEL_HIGH */
Linelib_uint8_t
DefaultLevel
;
/**< 初始电平 LEVEL_LOW /LEVEL_HIGH */
Linelib_uint8_t
TriggerLevel
;
/**< 触发电平 LEVEL_LOW /LEVEL_HIGH */
Linelib_uint8_t
TriggerLevel
;
/**< 触发电平 LEVEL_LOW /LEVEL_HIGH */
...
...
Firmware/Source/Component/PowerManagement/PowerManagement.h
View file @
4173f025
...
@@ -43,7 +43,7 @@ typedef Power_Status_em (*pfunc_Power_ON)(void);
...
@@ -43,7 +43,7 @@ typedef Power_Status_em (*pfunc_Power_ON)(void);
typedef
Power_Status_em
(
*
pfunc_Power_SLEEP
)(
void
);
typedef
Power_Status_em
(
*
pfunc_Power_SLEEP
)(
void
);
typedef
Power_Status_em
(
*
pfunc_Power_LIM
)(
void
);
typedef
Power_Status_em
(
*
pfunc_Power_LIM
)(
void
);
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
pfunPower_KL30_Init
Pwr_KL30_Init
;
pfunPower_KL30_Init
Pwr_KL30_Init
;
pfunPower_IG_OFF_Init
Pwr_IG_OFF_Init
;
pfunPower_IG_OFF_Init
Pwr_IG_OFF_Init
;
...
...
Firmware/Source/Component/Simulated_IIC_master/Simulated_IIC_master.h
View file @
4173f025
...
@@ -11,7 +11,7 @@ typedef struct stRTESIICMasterHandler
...
@@ -11,7 +11,7 @@ typedef struct stRTESIICMasterHandler
uint8_t
u8Busy
;
uint8_t
u8Busy
;
uint8_t
u8ReceivedACK
;
uint8_t
u8ReceivedACK
;
uint16_t
u16Rsvd
;
uint16_t
u16Rsvd
;
}
SIIC_M_Handler_st_t
;
}
__attribute__
((
aligned
(
4
)))
SIIC_M_Handler_st_t
;
typedef
enum
typedef
enum
{
{
...
...
Firmware/Source/Component/System_Monitor/System_Monitor.h
View file @
4173f025
...
@@ -47,7 +47,7 @@ typedef monitorlib_uint8_t (*Get_LineInStatus)(void);
...
@@ -47,7 +47,7 @@ typedef monitorlib_uint8_t (*Get_LineInStatus)(void);
typedef
void
(
*
COMMON_Delay
)(
monitorlib_uint32_t
mMs
);
typedef
void
(
*
COMMON_Delay
)(
monitorlib_uint32_t
mMs
);
typedef
void
(
*
pfunLogic
)(
void
);
typedef
void
(
*
pfunLogic
)(
void
);
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
Get_Voltage_Vaild
SysGet_KL30_Valid
;
Get_Voltage_Vaild
SysGet_KL30_Valid
;
Get_Voltage_Vaild
SysGet_KL15_Valid
;
Get_Voltage_Vaild
SysGet_KL15_Valid
;
...
...
Firmware/Source/Component/Telltales/Telltales_Lib.h
View file @
4173f025
...
@@ -67,7 +67,7 @@ typedef Tellib_uint32_t (*LED_PowerOFFTimer)(void); /**< 指示灯IG OFF时间
...
@@ -67,7 +67,7 @@ typedef Tellib_uint32_t (*LED_PowerOFFTimer)(void); /**< 指示灯IG OFF时间
* @brief 指示灯初始化结构体 \n
* @brief 指示灯初始化结构体 \n
* 定义指示灯初始化结构体属性
* 定义指示灯初始化结构体属性
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
Tellib_uint32_t
TotalLength
;
/**< 指示灯总数量 */
Tellib_uint32_t
TotalLength
;
/**< 指示灯总数量 */
LED_PowerOFFTimer
LED_PowerOFF_TimerCbk
;
/**< IG OFF下计时时间戳回调函数 */
LED_PowerOFFTimer
LED_PowerOFF_TimerCbk
;
/**< IG OFF下计时时间戳回调函数 */
...
@@ -78,7 +78,7 @@ typedef struct
...
@@ -78,7 +78,7 @@ typedef struct
* @brief 指示灯属性结构体 \n
* @brief 指示灯属性结构体 \n
* 定义指示灯结构体属性
* 定义指示灯结构体属性
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
Tellib_uint16_t
LED_Index
;
/**< 指示灯序号 */
Tellib_uint16_t
LED_Index
;
/**< 指示灯序号 */
Tellib_uint16_t
isSelfCheck
;
/**< 指示灯是否执行自检 */
Tellib_uint16_t
isSelfCheck
;
/**< 指示灯是否执行自检 */
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
4173f025
...
@@ -42,6 +42,7 @@ static void LED_E_Execution(Tellib_uint16_t led_status);
...
@@ -42,6 +42,7 @@ static void LED_E_Execution(Tellib_uint16_t led_status);
static
Tellib_uint16_t
LED_S_Judgement
(
void
);
static
Tellib_uint16_t
LED_S_Judgement
(
void
);
static
void
LED_S_Execution
(
Tellib_uint16_t
led_status
);
static
void
LED_S_Execution
(
Tellib_uint16_t
led_status
);
uint8_t
u8CanId401Flag
=
0
;
uint8_t
u8CanId401Flag
=
0
;
__align
(
4
)
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...
@@ -61,6 +62,7 @@ const LED_Attribute_st LED_Attribute [ LED_Max ] = {
...
@@ -61,6 +62,7 @@ const LED_Attribute_st LED_Attribute [ LED_Max ] = {
{
em_LED_Bluetooth
,
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_Bluetooth_Judgement
,
LED_Bluetooth_Execution
},
{
em_LED_Bluetooth
,
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_Bluetooth_Judgement
,
LED_Bluetooth_Execution
},
{
em_LED_E
,
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_E_Judgement
,
LED_E_Execution
},
{
em_LED_E
,
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_E_Judgement
,
LED_E_Execution
},
};
};
__align
(
4
)
Tellib_uint8_t
Tel_Mem
[
Tel_MEM_Block_Size
*
LED_Max
+
Tel_MEM_Block_Addition
];
Tellib_uint8_t
Tel_Mem
[
Tel_MEM_Block_Size
*
LED_Max
+
Tel_MEM_Block_Addition
];
void
Telltales_Init
(
void
)
void
Telltales_Init
(
void
)
{
{
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/GPIO/RTE_GPIO.h
View file @
4173f025
...
@@ -139,7 +139,7 @@ typedef enum
...
@@ -139,7 +139,7 @@ typedef enum
/**@struct RTE_GPIO_Config_st_t
/**@struct RTE_GPIO_Config_st_t
* @brief GPIO端口的配置结构 \n
* @brief GPIO端口的配置结构 \n
*/
*/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint16_t
u16PinNum
;
/**< GPIO端口编号(RTE_GPIO_PORTxx_PINyy) */
uint16_t
u16PinNum
;
/**< GPIO端口编号(RTE_GPIO_PORTxx_PINyy) */
uint16_t
u16PinMode
;
/**< GPIO工作模式 */
uint16_t
u16PinMode
;
/**< GPIO工作模式 */
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/RTC/RTE_RTC.h
View file @
4173f025
...
@@ -37,7 +37,7 @@ typedef enum
...
@@ -37,7 +37,7 @@ typedef enum
}
RTC_Alarm_Days_en_t
;
}
RTC_Alarm_Days_en_t
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint8_t
u8RTCYear
;
/*00~~99 in Dec*/
uint8_t
u8RTCYear
;
/*00~~99 in Dec*/
uint8_t
u8RTCMonth
;
/*01~~12 in Dec*/
uint8_t
u8RTCMonth
;
/*01~~12 in Dec*/
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/Tim40/RTE_TIM40.c
View file @
4173f025
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include "isr.h"
#include "isr.h"
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint32_t
u32Period
[
RTE_TIM40_PERIOD_FILTER_SUM
];
uint32_t
u32Period
[
RTE_TIM40_PERIOD_FILTER_SUM
];
uint32_t
u32Freq
;
uint32_t
u32Freq
;
...
@@ -73,6 +73,7 @@ uint32_t RTE_ENGINE_Freq_Get(void)
...
@@ -73,6 +73,7 @@ uint32_t RTE_ENGINE_Freq_Get(void)
return
RTE_Frequency_Get
(
RTE_ENGINE_CAP_CH
);
return
RTE_Frequency_Get
(
RTE_ENGINE_CAP_CH
);
}
}
__align
(
4
)
const
uint32_t
TIM4_Clock
[
16U
]
=
{
const
uint32_t
TIM4_Clock
[
16U
]
=
{
64000000UL
,
64000000UL
,
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/TrmerM/TrmerM.c
View file @
4173f025
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include "TrmerM.h"
#include "TrmerM.h"
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
TIMERM_PWM_Counter_en_t
counter
;
// 定时器选择
TIMERM_PWM_Counter_en_t
counter
;
// 定时器选择
}
Display_mode_Struct
;
}
Display_mode_Struct
;
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/UART/RTE_UART.c
View file @
4173f025
...
@@ -10,7 +10,7 @@ void RTE_UART_Sleep_Init(UART_Channel_en_t enUARTCh);
...
@@ -10,7 +10,7 @@ void RTE_UART_Sleep_Init(UART_Channel_en_t enUARTCh);
/*******************************************************************/
/*******************************************************************/
/*******************************************************/
/*******************************************************/
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint32_t
u32UARTCount
;
/*发送计数*/
uint32_t
u32UARTCount
;
/*发送计数*/
uint32_t
u32UARTLEN
;
/*发送数据总长*/
uint32_t
u32UARTLEN
;
/*发送数据总长*/
...
@@ -287,6 +287,7 @@ uint8_t UART_Ch3_Get_TX_Busy_Flag(void)
...
@@ -287,6 +287,7 @@ uint8_t UART_Ch3_Get_TX_Busy_Flag(void)
}
}
/* 一部代买码,暂时未使用,纯借鉴 */
/* 一部代买码,暂时未使用,纯借鉴 */
#define MAX_SERIAL_BUFF_SIZE 4096
#define MAX_SERIAL_BUFF_SIZE 4096
__align
(
4
)
/* 四字节对齐 */
uint8_t
mwAmt630hSerialSendBuffer
[
MAX_SERIAL_BUFF_SIZE
]
=
{
0
};
uint8_t
mwAmt630hSerialSendBuffer
[
MAX_SERIAL_BUFF_SIZE
]
=
{
0
};
uint16_t
mwAmt630hSerialDataIndex
=
0
;
uint16_t
mwAmt630hSerialDataIndex
=
0
;
uint16_t
mwAmt630hSerialSendCnts
=
0
;
uint16_t
mwAmt630hSerialSendCnts
=
0
;
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/UART/RTE_UART.h
View file @
4173f025
...
@@ -17,7 +17,7 @@ typedef enum
...
@@ -17,7 +17,7 @@ typedef enum
typedef
void
(
*
UART_Confirm
)(
void
);
typedef
void
(
*
UART_Confirm
)(
void
);
typedef
void
(
*
UART_Read_Msg
)(
uint16_t
u16UARTData
);
typedef
void
(
*
UART_Read_Msg
)(
uint16_t
u16UARTData
);
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint32_t
u32UARTChEn
;
/*通道是否使能*/
uint32_t
u32UARTChEn
;
/*通道是否使能*/
uint32_t
u32UARTbps
;
/*通道实际波特率*/
uint32_t
u32UARTbps
;
/*通道实际波特率*/
...
...
Firmware/Source/System/Sys_Scheduler_Lib.c
View file @
4173f025
#include <stddef.h>
#include <stddef.h>
#include "Sys_Scheduler_Lib.h"
#include "Sys_Scheduler_Lib.h"
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint32_t
u32msRocBak
;
uint32_t
u32msRocBak
;
uint32_t
u32Task2msCnt
;
uint32_t
u32Task2msCnt
;
...
@@ -12,7 +12,7 @@ typedef struct
...
@@ -12,7 +12,7 @@ typedef struct
uint32_t
u32Task100msCnt
;
uint32_t
u32Task100msCnt
;
}
Sys_Scheduler_st_t
;
}
Sys_Scheduler_st_t
;
typedef
struct
typedef
struct
__attribute__
((
aligned
(
4
)))
{
{
uint32_t
u32Pending
;
uint32_t
u32Pending
;
uint32_t
u32usCounter
;
uint32_t
u32usCounter
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment