Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
229176e1
Commit
229176e1
authored
Sep 10, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:代码评审问题:更改AD采集表格,重新生成代码
parent
5d5b9970
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
483 additions
and
13 deletions
+483
-13
Analog_Signals.c
Firmware/Source/Component/Analog/Analog_Signals.c
+13
-13
Analog_Signals_TianYing100.xlsm
Firmware/utility/MCU_Cfg/cfg/Analog_Signals_TianYing100.xlsm
+0
-0
Analog_Signals.h
Firmware/utility/MCU_Cfg/inc/Analog_Signals.h
+61
-0
Analog_Signals.c
Firmware/utility/MCU_Cfg/src/Analog_Signals.c
+409
-0
No files found.
Firmware/Source/Component/Analog/Analog_Signals.c
View file @
229176e1
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
#include "Analog_Signals.h"
#include "Analog_Signals.h"
/* Private typedef ----------------------------------------------------------*/
/* Private typedef ----------------------------------------------------------*/
typedef
struct
typedef
__attribute__
((
aligned
(
4
)))
struct
{
{
uint8_t
u8Ch
;
uint8_t
u8Ch
;
uint8_t
u8RefType
;
uint8_t
u8RefType
;
...
@@ -26,7 +26,7 @@ typedef struct
...
@@ -26,7 +26,7 @@ typedef struct
ADC_Circuit_Calc_Func
pfProcFunc
;
ADC_Circuit_Calc_Func
pfProcFunc
;
}
ADC_Ch_Cfg_st_t
;
}
ADC_Ch_Cfg_st_t
;
typedef
enum
ASigConvStat
typedef
__attribute__
((
aligned
(
4
)))
enum
ASigConvStat
{
{
ADC_STAT_IDLE
=
0
,
ADC_STAT_IDLE
=
0
,
ADC_STAT_INIT
,
ADC_STAT_INIT
,
...
@@ -36,7 +36,7 @@ typedef enum ASigConvStat
...
@@ -36,7 +36,7 @@ typedef enum ASigConvStat
ADC_STAT_ERR
,
ADC_STAT_ERR
,
}
ADC_Stat_en_t
;
}
ADC_Stat_en_t
;
typedef
struct
typedef
__attribute__
((
aligned
(
4
)))
struct
{
{
ADC_Stat_en_t
enStatus
;
ADC_Stat_en_t
enStatus
;
uint8_t
u8CurrentCh
;
uint8_t
u8CurrentCh
;
...
@@ -44,7 +44,7 @@ typedef struct
...
@@ -44,7 +44,7 @@ typedef struct
uint8_t
u8Timer
;
uint8_t
u8Timer
;
}
ADC_Ctrl_st_t
;
}
ADC_Ctrl_st_t
;
typedef
struct
typedef
__attribute__
((
aligned
(
4
)))
struct
{
{
uint8_t
u8Valid
;
uint8_t
u8Valid
;
uint8_t
u8Rsvd
;
uint8_t
u8Rsvd
;
...
@@ -72,20 +72,20 @@ ADC_Ctrl_st_t stADCCtrl;
...
@@ -72,20 +72,20 @@ ADC_Ctrl_st_t stADCCtrl;
uint16_t
u16ADCSample
[
ADC_CONV_CH_NUMBER
];
uint16_t
u16ADCSample
[
ADC_CONV_CH_NUMBER
];
ADC_Data_st_t
stADCData
[
ADC_SIGNAL_CH_NUMBER
];
ADC_Data_st_t
stADCData
[
ADC_SIGNAL_CH_NUMBER
];
const
uint8_t
u8ADCChList
[
ADC_CONV_CH_NUMBER
]
=
const
uint8_t
__attribute__
((
aligned
(
4
)))
u8ADCChList
[
ADC_CONV_CH_NUMBER
]
=
{
{
2U
,
3U
,
7U
,
5U
,
2U
,
3U
,
7U
,
5U
,
};
};
const
ADC_Ch_Cfg_st_t
stADCChCfg
[
ADC_SIGNAL_CH_NUMBER
]
=
const
__attribute__
((
aligned
(
4
)))
ADC_Ch_Cfg_st_t
stADCChCfg
[
ADC_SIGNAL_CH_NUMBER
]
=
{
{
{
0U
,
0U
,
0U
,
0U
,
70
0U
,
1U
,
ADC_Voltage_Calc_Circuit102
,},
{
0U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit102
,},
{
1U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit102
,},
{
1U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit102
,},
{
2U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit101
,},
{
2U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit101
,},
{
3U
,
2U
,
0U
,
2U
,
18
U
,
1U
,
ADC_Res_Calc_Circuit101
,},
{
3U
,
2U
,
0U
,
2U
,
0
U
,
1U
,
ADC_Res_Calc_Circuit101
,},
};
};
const
ADC_Res_List_st_t
stADCResList
[
ADC_SIGNAL_CH_NUMBER
]
=
const
__attribute__
((
aligned
(
4
)))
ADC_Res_List_st_t
stADCResList
[
ADC_SIGNAL_CH_NUMBER
]
=
{
{
{
3300000U
,
1000000U
,
0U
,
0U
,},
{
3300000U
,
1000000U
,
0U
,
0U
,},
{
3300000U
,
1000000U
,
0U
,
0U
,},
{
3300000U
,
1000000U
,
0U
,
0U
,},
...
@@ -115,10 +115,10 @@ void Analog_Signal_Conv_Init(void)
...
@@ -115,10 +115,10 @@ void Analog_Signal_Conv_Init(void)
}
}
}
}
RTE_ADC_Init
(
0
,
2
);
for
(
i
=
0U
;
i
<
ADC_CONV_CH_NUMBER
;
i
++
)
RTE_ADC_Init
(
0
,
3
);
{
RTE_ADC_Init
(
0
,
5
);
RTE_ADC_Init
(
0
,
u8ADCChList
[
i
]
);
RTE_ADC_Init
(
0
,
7
);
}
for
(
i
=
0U
;
i
<
ADC_SIGNAL_CH_NUMBER
;
i
++
)
for
(
i
=
0U
;
i
<
ADC_SIGNAL_CH_NUMBER
;
i
++
)
{
{
...
...
Firmware/utility/MCU_Cfg/cfg/Analog_Signals_TianYing
2
00.xlsm
→
Firmware/utility/MCU_Cfg/cfg/Analog_Signals_TianYing
1
00.xlsm
View file @
229176e1
No preview for this file type
Firmware/utility/MCU_Cfg/inc/Analog_Signals.h
0 → 100644
View file @
229176e1
/**************************************************************************//**
* \file Analog_Signals.h
* \brief Analog signal processing
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 2024/9/10 15:16:25
* Cfg Tool Ver : 1.1.0
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
*
******************************************************************************/
#ifndef ANALOG_SIGNALS_H__
#define ANALOG_SIGNALS_H__
/* Includes -----------------------------------------------------------------*/
#include "ADC.h"
#include "Analog_Circuits.h"
#include "RTE.h"
/* C binding of definitions if building with C++ compiler */
#ifdef __cplusplus
extern
{
#endif
/*! @{ */
/* Exported types ------------------------------------------------------------*/
enum
ADCChName
{
ADC_CH_KL30_VOLTAGE
=
0
,
ADC_CH_KL15_VOLTAGE
,
ADC_CH_FUEL_VREF
,
ADC_CH_FUEL1
,
};
/* Exported macro ------------------------------------------------------------*/
#define ADC_TOTAL_CH_NUMBER (4U)
#define ADC_SIGNAL_CH_NUMBER (4U)
#define ADC_REF_VOLTAGE u16ADCRefVoltage
/* Exported variables --------------------------------------------------------*/
extern
volatile
uint16_t
u16ADCRefVoltage
;
extern
const
uint8_t
u8ADCChList
[];
/* Exported functions --------------------------------------------------------*/
extern
void
Analog_Signal_Conv_Init
(
void
);
extern
void
Analog_Signal_Conv_Stop
(
void
);
extern
void
Analog_Signal_Conv_Service
(
void
);
extern
uint16_t
ADC_Read_Signal
(
uint8_t
u8ADCCh
);
extern
uint8_t
ADC_Read_Signal_Valid
(
uint8_t
u8ADCCh
);
extern
uint16_t
ADC_Conv_Single_Channel
(
uint8_t
u8ADCCh
);
/*! @} */
#ifdef __cplusplus
}
#endif
#endif
/* ANALOG_SIGNALS_H__ */
Firmware/utility/MCU_Cfg/src/Analog_Signals.c
0 → 100644
View file @
229176e1
This diff is collapsed.
Click to expand it.
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