goodwatch/firmware/packet.h

26 lines
422 B
C

/*! \file packet.h
\brief Packet handling library.
*/
#include<stdint.h>
//! Length of the packet buffer.
#define PACKETLEN 256
//! Receive packet buffer.
extern uint8_t rxbuffer[];
//! Transmit packet buffer.
extern uint8_t txbuffer[];
//! Switch to receiving packets.
void packet_rxon();
//! Stop receiving packets.
void packet_rxoff();
//! Transmit a packet.
void packet_tx(uint8_t *buffer, uint8_t length);