18 lines
467 B
C
18 lines
467 B
C
#ifndef TRANSMIT_H
|
|
#define TRANSMIT_H
|
|
|
|
#include <Arduino.h>
|
|
#include "ble.h"
|
|
#include "handlers.h"
|
|
|
|
#define PACKET_R_HEAD 0x00
|
|
#define PACKET_R_TAIL 0xFF
|
|
#define PACKET_T_HEAD 0x01
|
|
#define PACKET_T_TAIL 0xFE
|
|
#define PACKET_MAX_LENGTH 32 // 数据包最大长度
|
|
|
|
void handleSerialPacket(uint8_t *packet, int length, BLECharacteristic &characteristic);
|
|
void processSerialIncomingByte(uint8_t incomingByte, BLECharacteristic &characteristic);
|
|
void sendStatus();
|
|
|
|
#endif |