mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-06 04:23:42 +08:00
c1aeddbfea
Manage device power, parked services and vehicle-specific Panda wake behavior. Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> Co-authored-by: Daniel Koepping <elkoled@gmail.com> Co-authored-by: firestarsdog <229254897+firestarsdog@users.noreply.github.com>
37 lines
639 B
C
37 lines
639 B
C
// minimal code to fake a panda for tests
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "utils.h"
|
|
|
|
#define ALLOW_DEBUG
|
|
|
|
#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) {
|
|
return MICROSECOND_TIMER->CNT;
|
|
}
|
|
|
|
typedef uint32_t GPIO_TypeDef;
|
|
typedef uint32_t ADC_TypeDef;
|
|
typedef uint32_t IRQn_Type;
|
|
#define NUM_INTERRUPTS 163U
|
|
#include "stm32h7/lladc_declarations.h"
|