cleanup + prep for more tests! (#1172)

* panda for pc!

* little more

* fake panda

* move some more stuff

* increase timeout

* move that

* print helpers

* cleanup

* just move it for now

* revert jenkins changes
This commit is contained in:
Adeeb Shihadeh
2022-11-30 14:15:09 -08:00
committed by GitHub
parent e8bd1df511
commit 27504639f0
6 changed files with 80 additions and 104 deletions

View File

@@ -1,5 +1,6 @@
#ifndef PANDA_CONFIG_H
#define PANDA_CONFIG_H
#pragma once
#include <stdbool.h>
//#define DEBUG
//#define DEBUG_UART
@@ -8,31 +9,28 @@
//#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
#define MAX_EP1_CHUNK_PER_BULK_TRANSFER 16256U // max data stream chunk in bytes, shouldn't be higher than 16320 or counter will overflow
#define NULL ((void*)0)
#define COMPILE_TIME_ASSERT(pred) ((void)sizeof(char[1 - (2 * ((int)(!(pred))))]))
// USB definitions
#define USB_VID 0xBBAAU
#define MIN(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
(_a < _b) ? _a : _b; })
#ifdef BOOTSTUB
#define USB_PID 0xDDEEU
#else
#define USB_PID 0xDDCCU
#endif
#define MAX(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
(_a > _b) ? _a : _b; })
#define ABS(a) \
({ __typeof__ (a) _a = (a); \
(_a > 0) ? _a : (-_a); })
#include <stdbool.h>
#include "panda.h"
// platform includes
#ifdef STM32H7
#include "stm32h7/stm32h7_config.h"
#else
#elif defined(STM32F2) || defined(STM32F4)
#include "stm32fx/stm32fx_config.h"
#endif
#else
// TODO: uncomment this, cppcheck complains
// building for tests
//#include "fake_stm.h"
#endif