You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					41 lines
				
				680 B
			
		
		
			
		
	
	
					41 lines
				
				680 B
			| 
								 
											6 years ago
										 
									 | 
							
								#ifndef PANDA_CONFIG_H
							 | 
						||
| 
								 | 
							
								#define PANDA_CONFIG_H
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								//#define DEBUG
							 | 
						||
| 
								 | 
							
								//#define DEBUG_USB
							 | 
						||
| 
								 | 
							
								//#define DEBUG_SPI
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef STM32F4
							 | 
						||
| 
								 | 
							
								  #define PANDA
							 | 
						||
| 
								 | 
							
								  #include "stm32f4xx.h"
							 | 
						||
| 
								 | 
							
								#else
							 | 
						||
| 
								 | 
							
								  #include "stm32f2xx.h"
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								#define USB_VID 0xbbaaU
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef BOOTSTUB
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								#define USB_PID 0xddeeU
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								#else
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								#define USB_PID 0xddccU
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include <stdbool.h>
							 | 
						||
| 
								 | 
							
								#define NULL ((void*)0)
							 | 
						||
| 
								 | 
							
								#define COMPILE_TIME_ASSERT(pred) ((void)sizeof(char[1 - (2 * (!(pred)))]))
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#define MIN(a,b) \
							 | 
						||
| 
								 | 
							
								 ({ __typeof__ (a) _a = (a); \
							 | 
						||
| 
								 | 
							
								     __typeof__ (b) _b = (b); \
							 | 
						||
| 
								 | 
							
								   (_a < _b) ? _a : _b; })
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#define MAX(a,b) \
							 | 
						||
| 
								 | 
							
								 ({ __typeof__ (a) _a = (a); \
							 | 
						||
| 
								 | 
							
								     __typeof__ (b) _b = (b); \
							 | 
						||
| 
								 | 
							
								   (_a > _b) ? _a : _b; })
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								#define MAX_RESP_LEN 0x40U
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 |