diff --git a/Inc/mmr_can.h b/Inc/mmr_can.h index 945d31d..f4c4c8b 100644 --- a/Inc/mmr_can.h +++ b/Inc/mmr_can.h @@ -46,7 +46,7 @@ typedef uint32_t (*MmrCanTickProvider)(); typedef uint8_t CanRxBuffer[MMR_CAN_MAX_DATA_LENGTH]; -typedef struct { +typedef struct MmrCanFilterSettings { bool enabled; /** @@ -113,7 +113,7 @@ typedef struct { * // 'p' has been sent. * } */ -typedef struct { +typedef struct MmrCanPacket { MmrCanHeader header; uint8_t *data; uint8_t length; @@ -154,7 +154,7 @@ typedef struct { * // be used. * } */ -typedef struct { +typedef struct MmrCanMessage { MmrCanHeader header; void *store; } MmrCanMessage; diff --git a/Inc/mmr_can_events.h b/Inc/mmr_can_events.h index 6b4a6d2..fc05bcf 100644 --- a/Inc/mmr_can_events.h +++ b/Inc/mmr_can_events.h @@ -17,7 +17,7 @@ typedef void (*MmrCanEventHandler)(const MmrCanMessage *event); -typedef struct { +typedef struct MmrCanEventList { const MmrCanEventHandler *handlers; const size_t count; } MmrCanEventList; diff --git a/Inc/mmr_can_header.h b/Inc/mmr_can_header.h index 4bf9698..b6becf5 100644 --- a/Inc/mmr_can_header.h +++ b/Inc/mmr_can_header.h @@ -27,7 +27,7 @@ * * Constants with lower values have an higher priority. */ -typedef enum { +typedef enum MmrCanMessageType { MMR_CAN_MESSAGE_TYPE_SCS = B_(0000), MMR_CAN_MESSAGE_TYPE_ACK = B_(0001), MMR_CAN_MESSAGE_TYPE_MULTI_FRAME = B_(0010), @@ -36,7 +36,7 @@ typedef enum { } MmrCanMessageType; -typedef enum { +typedef enum MmrCanMessagePriority { MMR_CAN_MESSAGE_PRIORITY_LOW = B_(0010), MMR_CAN_MESSAGE_PRIORITY_NORMAL = B_(0001), MMR_CAN_MESSAGE_PRIORITY_HIGH = B_(0000), @@ -48,7 +48,7 @@ typedef enum { * This struct encodes the values stored inside the * extended id field of a CAN packet. */ -typedef struct { +typedef struct MmrCanHeader { MmrCanMessagePriority priority : 3; uint16_t messageId : 10; uint16_t senderId : 10; diff --git a/Inc/mmr_can_includes.h b/Inc/mmr_can_includes.h index 233f6bc..b2a735d 100644 --- a/Inc/mmr_can_includes.h +++ b/Inc/mmr_can_includes.h @@ -11,11 +11,8 @@ #ifndef INC_MMR_CAN_INCLUDES_H_ #define INC_MMR_CAN_INCLUDES_H_ -#include "stm32f3xx_hal.h" - #ifndef CAN #define CAN #endif - #endif /* INC_MMR_CAN_INCLUDES_H_ */ diff --git a/Inc/mmr_can_message_id.h b/Inc/mmr_can_message_id.h index a88accc..c7feee5 100644 --- a/Inc/mmr_can_message_id.h +++ b/Inc/mmr_can_message_id.h @@ -34,7 +34,7 @@ */ typedef enum MmrCanMessageId MmrCanMessageId; -typedef enum { +typedef enum MmrCanMessageIdType { MMR_CAN_MESSAGE_ID_TYPE_SCS = 0, MMR_CAN_MESSAGE_ID_TYPE_DRIVE = 1, } MmrCanMessageIdType; diff --git a/Inc/mmr_can_scs.h b/Inc/mmr_can_scs.h index 778ca88..1e17156 100644 --- a/Inc/mmr_can_scs.h +++ b/Inc/mmr_can_scs.h @@ -44,7 +44,7 @@ typedef uint32_t TimerRange; * Represents the base-struct to manage a single RTR * and allows to interface with the associated SCS's timer */ -typedef struct { +typedef struct MmrCanScsEntry { /** * @brief * The header used to index this entry. @@ -74,7 +74,7 @@ typedef struct { * @brief * The results of an scsCheck operation. */ -typedef enum { +typedef enum MmrCanScsCheckResult { /** * @brief No timeout error. */ diff --git a/Inc/mmr_can_util.h b/Inc/mmr_can_util.h index ef043da..6c3790e 100644 --- a/Inc/mmr_can_util.h +++ b/Inc/mmr_can_util.h @@ -73,7 +73,7 @@ * * Asynchronous logic can be easily implemented using State Machines */ -typedef enum { +typedef enum MmrAsyncResult { MMR_ASYNC_RESULT_ERROR, MMR_ASYNC_RESULT_PENDING, MMR_ASYNC_RESULT_COMPLETED,