Include bsp headers for timers.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-04-21 12:03:01 +02:00
parent cc78469c01
commit dfeb5b973b
7 changed files with 13 additions and 15 deletions

View File

@@ -18,8 +18,8 @@
#include "picokeys.h" #include "picokeys.h"
#include "button.h" #include "button.h"
#include "led/led.h" #include "led/led.h"
#include "pico_time.h"
#if defined(PICO_PLATFORM) #if defined(PICO_PLATFORM)
#include "bsp/board.h"
#include "hardware/sync.h" #include "hardware/sync.h"
#include "hardware/structs/ioqspi.h" #include "hardware/structs/ioqspi.h"
#include "hardware/gpio.h" #include "hardware/gpio.h"

View File

@@ -18,6 +18,7 @@
#ifndef _BOARD_H_ #ifndef _BOARD_H_
#define _BOARD_H_ #define _BOARD_H_
#include <stdint.h>
#ifdef _MSC_VER #ifdef _MSC_VER
#include <windows.h> #include <windows.h>
struct timezone; struct timezone;

View File

@@ -17,11 +17,9 @@
#include "picokeys.h" #include "picokeys.h"
#include "led/led.h" #include "led/led.h"
#ifdef PICO_PLATFORM #include "pico_time.h"
#include "bsp/board.h" #if defined(ESP_PLATFORM)
#elif defined(ESP_PLATFORM)
#include "driver/gpio.h" #include "driver/gpio.h"
#include "compat/esp_compat.h"
#elif defined(ENABLE_EMULATION) #elif defined(ENABLE_EMULATION)
#include "emulation.h" #include "emulation.h"
#endif #endif

View File

@@ -18,11 +18,15 @@
#ifndef TIME_H #ifndef TIME_H
#define TIME_H #define TIME_H
#ifdef PICO_PLATFORM #if defined(PICO_PLATFORM)
#include "pico/aon_timer.h" #include "pico/aon_timer.h"
#include "bsp/board.h"
#elif defined(ESP_PLATFORM)
#include "compat/esp_compat.h"
#else #else
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>
#include "compat/board.h"
#endif #endif
extern bool has_set_rtc(void); extern bool has_set_rtc(void);

View File

@@ -17,17 +17,13 @@
#include "picokeys.h" #include "picokeys.h"
#include "hwrng.h" #include "hwrng.h"
#include "pico_time.h"
#if defined(PICO_PLATFORM) #if defined(PICO_PLATFORM)
#include "bsp/board.h"
#include "pico/rand.h" #include "pico/rand.h"
#elif defined(ESP_PLATFORM) #elif defined(ESP_PLATFORM)
#include "bootloader_random.h" #include "bootloader_random.h"
#include "esp_random.h" #include "esp_random.h"
#include "compat/esp_compat.h"
#else
#include <time.h>
#include "compat/board.h"
#endif #endif
static void hwrng_start(void) { static void hwrng_start(void) {

View File

@@ -17,11 +17,10 @@
#include "picokeys.h" #include "picokeys.h"
#include "serial.h" #include "serial.h"
#include "pico_time.h"
#ifndef ENABLE_EMULATION #ifndef ENABLE_EMULATION
#include "tusb.h" #include "tusb.h"
#if defined(PICO_PLATFORM) #if defined(ESP_PLATFORM)
#include "bsp/board.h"
#elif defined(ESP_PLATFORM)
static portMUX_TYPE mutex = portMUX_INITIALIZER_UNLOCKED; static portMUX_TYPE mutex = portMUX_INITIALIZER_UNLOCKED;
#endif #endif
#else #else

View File

@@ -19,11 +19,11 @@
#include "usb.h" #include "usb.h"
#include "led/led.h" #include "led/led.h"
#include "button.h" #include "button.h"
#include "pico_time.h"
#if defined(PICO_PLATFORM) #if defined(PICO_PLATFORM)
#include "pico/bootrom.h" #include "pico/bootrom.h"
#include "pico/multicore.h" #include "pico/multicore.h"
#include "hardware/sync.h" #include "hardware/sync.h"
#include "bsp/board.h"
#define multicore_launch_func_core1(a) multicore_launch_core1((void (*) (void))a) #define multicore_launch_func_core1(a) multicore_launch_core1((void (*) (void))a)
#endif #endif
#include "apdu.h" #include "apdu.h"