-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataSampling.h
More file actions
71 lines (57 loc) · 2.17 KB
/
Copy pathDataSampling.h
File metadata and controls
71 lines (57 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*********************************************************************************/
/*
* Author : Jeong Hyun Gu
* File name : DataSampling.h
*/
/*********************************************************************************/
#ifndef __DATA_SAMPLING_H__
#define __DATA_SAMPLING_H__
/*********************************************************************************/
#include "SysTypedef.h"
/*********************************************************************************/
#define DATA_SAMPLING_REVISION_DATE 20230125
/*********************************************************************************/
/** REVISION HISTORY **/
/*
2023. 01. 25. - 주석 추가.
Jeong Hyun Gu
2020. 07. 24. - 이제 샘플링 데이터의 자료형을 tS8, tS16, tS32 중 선택할 수 있음.
Jeong Hyun Gu
2020. 04. 16. - DataSamplingResetData()에서 FillBuffer()호출 부분 삭제.
Jeong Hyun Gu
2019. 07. 23. - SysTypedef.h 적용.
Jeong Hyun Gu
2018. 04. 03. - DataSamplingResetData() 함수 추가.
Jeong Hyun Gu
2017. 10. 17. - 초기버전.
Jeong Hyun Gu
*/
/*********************************************************************************/
/**Define**/
#define false 0
#define true 1
#define null 0
/*********************************************************************************/
/**Enum**/
/*********************************************************************************/
/**Struct**/
typedef struct
{
struct
{
tU8 InitGeneral : 1; //필수초기화
tU8 InitFillBuffer : 1; //버퍼초기화
}Bit;
void *Buf;
tS16 Index, BufSize, Level;
tS32 Sum;
tS8 DataSize;
}tag_DataSampling;
/*********************************************************************************/
/**Function**/
tU8 DataSamplingInitGeneral(tag_DataSampling *Smp, tS16 BufSize, tS8 DataSzie);
void DataSamplingChangeLevel(tag_DataSampling *Smp, tS16 Level);
tS32 DataSamplingGetData(tag_DataSampling *Smp, tS32 Data);
void DataSamplingResetData(tag_DataSampling *Smp);
/*********************************************************************************/
#endif //__DATA_SAMPLING_H__