Skip to content

Commit

Permalink
Merge pull request #70 from bitcraze/tobba/syslink_startup_after_rece…
Browse files Browse the repository at this point in the history
…ption

Syslink will now only enable send after a packet has been received.
  • Loading branch information
krichardsson authored May 10, 2022
2 parents 508bdc2 + 3f4c186 commit aed55d2
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 217 deletions.
20 changes: 20 additions & 0 deletions interface/syslink.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,31 @@ struct syslinkPacket {
char data[SYSLINK_MTU];
};

/**
* Receive syslink packet.
*
* @param packet Syslink packet to receive data.
*/
bool syslinkReceive(struct syslinkPacket *packet);

/**
* Send syslink packet.
* Will only send if link is first activated by a packet beeing received.
*
* @param packet Syslink packet containing data to send.
*/
bool syslinkSend(struct syslinkPacket *packet);

/**
* Reset syslink state machine.
*/
void syslinkReset();

/**
* Deactivate syslink. Meaning no packets will be sent
* until a packet first has been received.
*/
void syslinkDeactivateUntilPacketReceived();

// Defined packet types
#define SYSLINK_RADIO_RAW 0x00
Expand Down
Loading

0 comments on commit aed55d2

Please sign in to comment.