generated from hulk/gd32e23x_template
@@ -13,12 +13,13 @@
|
||||
#include "fwdgt.h"
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ultrasonic_analog.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#define RX_BUFFER_SIZE 32
|
||||
|
||||
#define PROTOCOL_PACKAGE_HEADER 0xD5
|
||||
#define PROTOCOL_BOARD_TYPE 0x04
|
||||
#define PROTOCOL_PACKAGE_LENGTH 0x02
|
||||
@@ -42,16 +43,10 @@ typedef enum
|
||||
PS_PAYLOAD,
|
||||
PS_CRC,
|
||||
PS_NULL
|
||||
} packet_state_t;
|
||||
} packet_state;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#define BUF_SIZE 8
|
||||
#define MAX_CMD_SIZE 16
|
||||
#define PACKET_START_BYTE 0xD5
|
||||
|
||||
|
||||
bool code_seen(char code);
|
||||
// void process_command(uint8_t* cmd, size_t length);
|
||||
void process_command(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user