Line data Source code
1 : // minimal code to fake a panda for tests
2 : #include <stdio.h>
3 : #include <stdint.h>
4 : #include <stdlib.h>
5 :
6 : #include "utils.h"
7 :
8 : #define ALLOW_DEBUG
9 : #define PANDA
10 :
11 160 : void print(const char *a) {
12 160 : printf("%s", a);
13 160 : }
14 :
15 80 : void puth(unsigned int i) {
16 80 : printf("%u", i);
17 80 : }
18 :
19 : typedef struct {
20 : uint32_t CNT;
21 : } TIM_TypeDef;
22 :
23 : TIM_TypeDef timer;
24 : TIM_TypeDef *MICROSECOND_TIMER = &timer;
25 : uint32_t microsecond_timer_get(void);
26 :
27 2444367 : uint32_t microsecond_timer_get(void) {
28 2444367 : return MICROSECOND_TIMER->CNT;
29 : }
|