FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
AQ32Plus/src/evr.h at master · jihlein/AQ32Plus · GitHub
jihlein
/
AQ32Plus
Public
Notifications
You must be signed in to change notification settings
Fork
46
Star
41
Code
Issues
1
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
AQ32Plus
/
src
/
evr.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
79 lines (67 loc) · 1.92 KB
Breadcrumbs
AQ32Plus
/
src
/
evr.h
Copy path
File metadata and controls
79 lines (67 loc) · 1.92 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
72
73
74
75
76
77
78
79
/**
\file evr.h
\brief EVR (EVent Report).
\copyright Copyright (C) 2013 Ashima Research. All rights reserved. This
file distributed under the MIT Expat License. See LICENSE file.
https://github.com/ashima/AQ32Plus
\remark Ported for AQ32Plus.
*/
///////////////////////////////////////////////////////////////////////////////
#pragma
once
///////////////////////////////////////////////////////////////////////////////
typedef
struct
{
uint32_t
time
;
/*!< Time of event */
uint16_t
evr
;
/*! The event to report */
uint16_t
reason
;
/*!< optional event parameter (reason) if any */
}
evr_t
;
typedef
void
(
*
evrListener_fp
)(
evr_t
);
/*!< prototype for listener functions */
typedef
const
char
*
constStrArr_t
[];
typedef
struct
evrStringTable_t
{
const
char
*
severity
;
const
char
*
*
msgs
;
uint32_t
len
;
}
evrStringTable_t
;
enum
{
evrTypesNUM
=
4
} ;
extern
const
evrStringTable_t
evrStringTable
[
evrTypesNUM
];
void
evrPush
(
uint16_t
evr
,
uint16_t
reason
);
int
evrRegisterListener
(
evrListener_fp
f
);
void
evrCheck
();
void
evrHistory
(
evrListener_fp
);
uint16_t
evrSeverity
(
uint16_t
evr
);
const
char
*
evrSeverityToStr
(
uint16_t
s
);
const
char
*
evrToSeverityStr
(
uint16_t
evr
);
const
char
*
evrToStr
(
uint16_t
);
/*
Evr Lists for Information, Warnings, Errors and Fatal event reports.
*/
enum
evrInfoList
{
EVR_NoEvrHere
=
0U
,
EVR_NormalReset
,
EVR_StartingMain
,
};
enum
evrWarnList
{
EVR_AbnormalReset
=
0x4000U
,
EVR_BatLow
,
EVR_BatVeryLow
,
EVR_ConfigBadHistory
,
EVR_SDCard_Failed
,
};
enum
evrErrorList
{
EVR_OutOfListeners
=
0x8000U
,
EVR_primarySpektrumFrameLost
,
EVR_slaveSpektrumFrameLost
,
EVR_sBusFrameLost
,
EVR_rcDataLost
,
EVR_FailRegisterWatchdogFrameReset
,
EVR_FailRegisterWatchdogFrameLost
,
EVR_RxFrameLost
,
EVR_BatMaxLow
,
EVR_FlashCRCFail
,
EVR_FlashEraseFail
,
EVR_FlashProgramFail
,
};
//enum evrFatalList {
// EVR_ = 0xC000
// };
Back
|
FazBrowse Home
|
New Git URL