mirror of https://github.com/commaai/panda.git
parent
afafb0ba46
commit
2037a2ead7
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include "can_declarations.h"
|
||||
|
||||
const uint8_t PANDA_CAN_CNT = 3U;
|
||||
const uint8_t PANDA_BUS_CNT = 3U;
|
||||
static const uint8_t PANDA_CAN_CNT = 3U;
|
||||
static const uint8_t PANDA_BUS_CNT = 3U;
|
||||
|
||||
const unsigned char dlc_to_len[DLC_TO_LEN_ARRAY_SIZE] = {0U, 1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 12U, 16U, 20U, 24U, 32U, 48U, 64U};
|
||||
static const unsigned char dlc_to_len[] = {0U, 1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 12U, 16U, 20U, 24U, 32U, 48U, 64U};
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
extern const uint8_t PANDA_CAN_CNT;
|
||||
extern const uint8_t PANDA_BUS_CNT;
|
||||
|
||||
// bump this when changing the CAN packet
|
||||
#define CAN_PACKET_VERSION 4
|
||||
|
||||
|
@ -27,9 +24,6 @@ typedef struct {
|
|||
unsigned char data[CANPACKET_DATA_SIZE_MAX];
|
||||
} __attribute__((packed, aligned(4))) CANPacket_t;
|
||||
|
||||
#define DLC_TO_LEN_ARRAY_SIZE 16
|
||||
extern const unsigned char dlc_to_len[DLC_TO_LEN_ARRAY_SIZE];
|
||||
|
||||
#define GET_BUS(msg) ((msg)->bus)
|
||||
#define GET_LEN(msg) (dlc_to_len[(msg)->data_len_code])
|
||||
#define GET_ADDR(msg) ((msg)->addr)
|
||||
|
|
Loading…
Reference in New Issue