mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
* cleanup is_enumerated, rename comms and init spi * big comms refactor, building now * misra fixes * more fixes * misra try 3 * cleanup * this belongs in a separate PR * remove unneccesary file * revert llspi changes * this needs packing * fix pedal usb Co-authored-by: Comma Device <device@comma.ai>
27 lines
596 B
C
27 lines
596 B
C
// USB definitions
|
|
#define USB_VID 0xBBAAU
|
|
|
|
#ifdef BOOTSTUB
|
|
#define USB_PID 0xDDEEU
|
|
#else
|
|
#define USB_PID 0xDDCCU
|
|
#endif
|
|
|
|
#define USBPACKET_MAX_SIZE 0x40U
|
|
|
|
#define MAX_CAN_MSGS_PER_BULK_TRANSFER 51U
|
|
#define MAX_EP1_CHUNK_PER_BULK_TRANSFER 16256U // max data stream chunk in bytes, shouldn't be higher than 16320 or counter will overflow
|
|
|
|
// CAN definitions
|
|
#define CANPACKET_HEAD_SIZE 5U
|
|
|
|
#if !defined(STM32F4) && !defined(STM32F2)
|
|
#define CANPACKET_DATA_SIZE_MAX 64U
|
|
#else
|
|
#define CANPACKET_DATA_SIZE_MAX 8U
|
|
#endif
|
|
|
|
#define CAN_CNT 3U
|
|
#define BUS_CNT 4U
|
|
#define CAN_INIT_TIMEOUT_MS 500U
|