Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions inc/slcan.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
#ifndef _SLCAN_H
#define _SLCAN_H

/**
* @brief Parses CAN frame and generates SLCAN message
* @return Number of bytes in generated SLCAN message
*/
int8_t slcan_parse_frame(uint8_t *buf, CAN_RxHeaderTypeDef *frame_header, uint8_t* frame_data);

/**
* @brief Parses SLCAN message and configures CAN peripheral accordingly or transmits CAN frame
* @param buf: Pointer to SLCAN message
* @param len: Number of bytes in SLCAN message
* @return Zero if successful, other values indicate an error
*/
int8_t slcan_parse_str(uint8_t *buf, uint8_t len);

// maximum rx buffer len: extended CAN frame with timestamp
Expand Down