mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-12-16 16:48:04 +00:00
Move CAN subdir
This commit is contained in:
48
include/sta/can/headers.hpp
Normal file
48
include/sta/can/headers.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief CAN frame headers.
|
||||
*/
|
||||
#ifndef STA_CAN_HEADERS_HPP
|
||||
#define STA_CAN_HEADERS_HPP
|
||||
|
||||
#include <sta/can/id.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
/**
|
||||
* @defgroup canHeader Frame headers
|
||||
* @ingroup canAPI
|
||||
* @brief CAN header types for transmitted / received frames.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief CAN TX frame header.
|
||||
*
|
||||
* @ingroup canHeader
|
||||
*/
|
||||
struct CanTxHeader
|
||||
{
|
||||
CanFrameId id; /**< Frame ID */
|
||||
uint8_t payloadLength; /**< Size of data to send */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief CAN RX frame header.
|
||||
*
|
||||
* @ingroup canHeader
|
||||
*/
|
||||
struct CanRxHeader
|
||||
{
|
||||
CanFrameId id; /**< Frame ID */
|
||||
uint8_t payloadLength; /**< Size of received data */
|
||||
uint32_t timestamp; /**< RX timestamp */
|
||||
uint8_t filter; /**< RX filter match */
|
||||
};
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_CAN_HEADERS_HPP
|
||||
Reference in New Issue
Block a user