leakage
This commit is contained in:
64
calib_board/usr/protocol/proto_print.c
Normal file
64
calib_board/usr/protocol/proto_print.c
Normal file
@@ -0,0 +1,64 @@
|
||||
#include "proto_print.h"
|
||||
|
||||
#include "stdio.h"
|
||||
#include "bsp_Uart.h"
|
||||
|
||||
u16 proto_print_data_type;
|
||||
|
||||
void proto_print_datatype_set(u8 type);
|
||||
static void proto_print_task(void);
|
||||
|
||||
proto_print_t print =
|
||||
{
|
||||
.task = proto_print_task,
|
||||
.set = proto_print_datatype_set,
|
||||
};
|
||||
|
||||
proto_print_t *p_print = &print;
|
||||
|
||||
static void proto_print_datatype_set(u8 type)
|
||||
{
|
||||
if(type > PROTO_PRINT_MAX)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(proto_print_data_type == type)
|
||||
{
|
||||
proto_print_data_type = PROTO_PRINT_NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
proto_print_data_type = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void proto_print_task(void)
|
||||
{
|
||||
switch(proto_print_data_type)
|
||||
{
|
||||
case PROTO_PRINT_NULL:
|
||||
{
|
||||
|
||||
}break;
|
||||
case PROTO_PRINT_CURDATA:
|
||||
{
|
||||
|
||||
}break;
|
||||
case PROTO_PRINT_WAVE:
|
||||
{
|
||||
|
||||
}break;
|
||||
case PROTO_PRINT_CALIB:
|
||||
{
|
||||
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
|
||||
}break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user