mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
* no more magic * bump version * no need for this * comment cleanup * add comms_can_reset tests * we can't ensure this for compatibility reasons * add CANPacket_t checksum
36 lines
693 B
C
36 lines
693 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
//#define DEBUG
|
|
//#define DEBUG_UART
|
|
//#define DEBUG_USB
|
|
//#define DEBUG_SPI
|
|
//#define DEBUG_FAULTS
|
|
//#define DEBUG_COMMS
|
|
|
|
#define CAN_INIT_TIMEOUT_MS 500U
|
|
#define DEEPSLEEP_WAKEUP_DELAY 3U
|
|
#define USBPACKET_MAX_SIZE 0x40U
|
|
#define MAX_CAN_MSGS_PER_BULK_TRANSFER 51U
|
|
|
|
// USB definitions
|
|
#define USB_VID 0xBBAAU
|
|
|
|
#ifdef BOOTSTUB
|
|
#define USB_PID 0xDDEEU
|
|
#else
|
|
#define USB_PID 0xDDCCU
|
|
#endif
|
|
|
|
// platform includes
|
|
#ifdef STM32H7
|
|
#include "stm32h7/stm32h7_config.h"
|
|
#elif defined(STM32F2) || defined(STM32F4)
|
|
#include "stm32fx/stm32fx_config.h"
|
|
#else
|
|
// TODO: uncomment this, cppcheck complains
|
|
// building for tests
|
|
//#include "fake_stm.h"
|
|
#endif
|