mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-22 08:43:54 +08:00
6d316f2bc7
date: 2024-06-11T01:36:39 master commit: f8cb04e4a8b032b72a909f68b808a50936184bee
34 lines
547 B
C
34 lines
547 B
C
// minimal code to fake a panda for tests
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "utils.h"
|
|
|
|
#define CANFD
|
|
#define ALLOW_DEBUG
|
|
#define PANDA
|
|
|
|
#define ENTER_CRITICAL() 0
|
|
#define EXIT_CRITICAL() 0
|
|
|
|
void print(const char *a) {
|
|
printf("%s", a);
|
|
}
|
|
|
|
void puth(unsigned int i) {
|
|
printf("%u", i);
|
|
}
|
|
|
|
typedef struct {
|
|
uint32_t CNT;
|
|
} TIM_TypeDef;
|
|
|
|
TIM_TypeDef timer;
|
|
TIM_TypeDef *MICROSECOND_TIMER = &timer;
|
|
uint32_t microsecond_timer_get(void);
|
|
|
|
uint32_t microsecond_timer_get(void) {
|
|
return MICROSECOND_TIMER->CNT;
|
|
}
|