Arduino_VESC_Library
vesc_packet.h
Go to the documentation of this file.
1
/*
2
* This file is part of the arduino vesc library (https://github.com/arduino_vesc)
3
*
4
* Copyright (c) 2019 Gianmarco Vitelli
5
*
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, version 3.
9
*
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
22
class
VescPacket
{
23
public
:
24
static
bool
receive_packet
(HardwareSerial* port,
unsigned
char
*data);
25
static
void
send_packet
(HardwareSerial* port,
unsigned
char
*data,
unsigned
int
len);
26
static
unsigned
short
crc16
(
unsigned
char
*buf,
unsigned
int
len);
27
};
VescPacket::send_packet
static void send_packet(HardwareSerial *port, unsigned char *data, unsigned int len)
send packet to vesc
Definition:
vesc_packet.cpp:30
VescPacket::crc16
static unsigned short crc16(unsigned char *buf, unsigned int len)
generate crc16
Definition:
vesc_packet.cpp:168
VescPacket::receive_packet
static bool receive_packet(HardwareSerial *port, unsigned char *data)
receive packet from vesc
Definition:
vesc_packet.cpp:80
VescPacket
class to receive and send packet
Definition:
vesc_packet.h:22
vesc_packet.h
Generated on Thu Nov 14 2019 10:42:25 for Arduino_VESC_Library by
1.8.16