CanCategory

This commit is contained in:
rusefillc 2022-09-18 20:44:00 -04:00
parent fbf00ae180
commit 2be1db62a2
3 changed files with 19 additions and 11 deletions

View File

@ -0,0 +1,15 @@
/**
* can_category.h
*/
#pragma once
enum class CanCategory : uint16_t {
NBC = 0,
VERBOSE = 1,
LUA = 2,
DOWNSTREAM_FLASHING = 3,
SERIAL = 4,
WBO_SERVICE = 5,
OBD = 6,
};

View File

@ -23,6 +23,7 @@
#endif // EFI_CAN_SUPPORT
CanTxMessage::CanTxMessage(CanCategory category, uint32_t eid, uint8_t dlc, bool isExtended) {
this->category = category;
#if HAL_USE_CAN || EFI_UNIT_TEST
#ifndef STM32H7XX
// ST bxCAN device

View File

@ -12,19 +12,9 @@
#include <cstdint>
#include <cstddef>
#include "can_category.h"
#include "can.h"
enum class CanCategory : uint16_t {
NBC = 0,
VERBOSE = 1,
LUA = 2,
DOWNSTREAM_FLASHING = 3,
SERIAL = 4,
WBO_SERVICE = 5,
OBD = 6,
};
/**
* Represent a message to be transmitted over CAN.
*
@ -46,6 +36,8 @@ public:
*/
~CanTxMessage();
CanCategory category;
#if EFI_CAN_SUPPORT
/**
* Configures the device for all messages to transmit from.