Line | |
---|
1 | #ifndef __LOG_AND_DEBUG_H
|
---|
2 | #define __LOG_AND_DEBUG_H
|
---|
3 |
|
---|
4 | #include "main.h"
|
---|
5 |
|
---|
6 | #define NUM_LEVEL_DEBUG 6
|
---|
7 | #define DEBUG_SERVSE ((uint16_t)0x0001)
|
---|
8 | #define DEBUG_ETH ((uint16_t)0x0002)
|
---|
9 | #define DEBUG_PLC_CROSS ((uint16_t)0x0004)
|
---|
10 | #define DEBUG_PLC_TRANSIT ((uint16_t)0x0008)
|
---|
11 | #define DEBUG_WEB_SERVER ((uint16_t)0x0010)
|
---|
12 | #define DEBUG_TEMP ((uint16_t)0x0020)
|
---|
13 |
|
---|
14 | #define CMDLEN 20
|
---|
15 |
|
---|
16 | #define PARAM_INT 0
|
---|
17 | #define PARAM_STR 1
|
---|
18 |
|
---|
19 | /*typedef struct {
|
---|
20 | char *msg;
|
---|
21 | uint16_t msg_len;
|
---|
22 | }degug_msg_typeDef;*/
|
---|
23 |
|
---|
24 | typedef struct {
|
---|
25 | char *cmd;
|
---|
26 | void (*pfunc)();
|
---|
27 | uint8_t typepar;
|
---|
28 | }CMD_STRUCT ;
|
---|
29 |
|
---|
30 | void __debug_init(void);
|
---|
31 | void debug_receive(uint8_t* Buf, uint32_t *Len);
|
---|
32 | uint8_t __debug(uint32_t level, const char *format, ...);
|
---|
33 | void __logWrite(const char *format, ...);
|
---|
34 |
|
---|
35 | #endif /* __LOG_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.