source: S-port/trunk/Core/Inc/log_and_debug.h

Last change on this file was 1, checked in by AlexLir, 3 years ago
File size: 836 bytes
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
24typedef struct {
25 char *cmd;
26 void (*pfunc)();
27 uint8_t typepar;
28}CMD_STRUCT ;
29
30void __debug_init(void);
31void debug_receive(uint8_t* Buf, uint32_t *Len);
32uint8_t __debug(uint32_t level, const char *format, ...);
33void __logWrite(const char *format, ...);
34
35#endif /* __LOG_H */
Note: See TracBrowser for help on using the repository browser.