Artemis Teensy Flight Software
The software on the Teensy in the Artemis cubesat.
|
Functions | |
int32_t | slip_unpack (uint8_t *sbuf, uint16_t ssize, uint8_t *rbuf, uint16_t rsize) |
Unpack SLIP packet. More... | |
int32_t | slip_unpack (vector< uint8_t > &sbuf, vector< uint8_t > &rbuf) |
int32_t | slip_decode (uint8_t *sbuf, uint16_t ssize, uint8_t *rbuf, uint16_t rsize) |
Decode SLIP packet. More... | |
int32_t | slip_decode (vector< uint8_t > &sbuf, vector< uint8_t > &rbuf) |
int32_t | slip_encode (uint8_t *rbuf, uint16_t rsize, uint8_t *sbuf, uint16_t ssize) |
Encode data in to SLIP packet. More... | |
int32_t | slip_encode (vector< uint8_t > &rbuf, vector< uint8_t > &sbuf) |
int32_t | slip_pack (uint8_t *rbuf, uint16_t rsize, uint8_t *sbuf, uint16_t ssize) |
Pack data in to SLIP packet. More... | |
int32_t | slip_pack (vector< uint8_t > &rbuf, vector< uint8_t > &sbuf) |
int32_t | slip_extract (FILE *fp, vector< uint8_t > &rbuf) |
uint16_t | slip_calc_crc (uint8_t *buf, uint16_t size) |
Calculate CRC-16-CCITT. More... | |
uint16_t | slip_calc_crc (vector< uint8_t > &buf) |
uint16_t slip_calc_crc | ( | uint8_t * | buf, |
uint16_t | size | ||
) |
Calculate CRC-16-CCITT.
Calculate 16-bit CCITT CRC for the indicated buffer and number of bytes. The initial shift register value is 0xffff, and the calculation starts with the LSB, so the Polynomial is 0x8408.
buf | bytes to calculate on |
size | number of bytes |
int32_t slip_decode | ( | uint8_t * | sbuf, |
uint16_t | ssize, | ||
uint8_t * | rbuf, | ||
uint16_t | rsize | ||
) |
Decode SLIP packet.
Convert SLIP data in one buffer to raw ASCII data in second buffer and return length.
sbuf | character buffer to read SLIP data from |
ssize | size of SLIP buffer |
rbuf | character buffer to store raw data |
rsize | size of raw buffer, including terminal 0 |
int32_t slip_encode | ( | uint8_t * | rbuf, |
uint16_t | rsize, | ||
uint8_t * | sbuf, | ||
uint16_t | ssize | ||
) |
Encode data in to SLIP packet.
Convert raw ASCII in one buffer to SLIP encoded data in second buffer.
rbuf | Buffer with raw data |
rsize | Number of bytes in raw buffer |
sbuf | Buffer to place SLIP data in |
ssize | Maximum size of SLIP buffer |
int32_t slip_pack | ( | uint8_t * | rbuf, |
uint16_t | rsize, | ||
uint8_t * | sbuf, | ||
uint16_t | ssize | ||
) |
Pack data in to SLIP packet.
Convert raw ASCII in one buffer to SLIP encoded data in second buffer, appending a 16 bit CCITT CRC.
rbuf | Buffer with raw data |
rsize | Number of bytes in raw buffer |
sbuf | Buffer to place SLIP data in |
ssize | Maximum size of SLIP buffer |
int32_t slip_unpack | ( | uint8_t * | sbuf, |
uint16_t | ssize, | ||
uint8_t * | rbuf, | ||
uint16_t | rsize | ||
) |
Unpack SLIP packet.
Convert SLIP data in one buffer to raw ASCII data in second buffer and return length.
sbuf | character buffer to read SLIP data from |
ssize | size of SLIP buffer |
rbuf | character buffer to store raw data |
rsize | size of raw buffer, including terminal 0 |