10 # include <nuttx/arch.h> 11 # include <arch/board/board.h> 12 # include <hardware/stm32_tim.h> 21 #ifndef UAVCAN_STM32_LOG 25 # define UAVCAN_STM32_LOG(fmt, ...) syslog("uavcan_stm32: " fmt "\n", ##__VA_ARGS__) 27 # define UAVCAN_STM32_LOG(...) ((void)0) 34 #if UAVCAN_STM32_NUTTX 35 # define UAVCAN_STM32_IRQ_HANDLER(id) int id(int irq, FAR void* context, FAR void *arg) 36 # define UAVCAN_STM32_IRQ_PROLOGUE() 37 # define UAVCAN_STM32_IRQ_EPILOGUE() return 0; 43 #define UAVCAN_STM32_GLUE2_(A, B) A##B 44 #define UAVCAN_STM32_GLUE2(A, B) UAVCAN_STM32_GLUE2_(A, B) 46 #define UAVCAN_STM32_GLUE3_(A, B, C) A##B##C 47 #define UAVCAN_STM32_GLUE3(A, B, C) UAVCAN_STM32_GLUE3_(A, B, C) 51 #if UAVCAN_STM32_NUTTX 53 struct CriticalSectionLocker {
54 const irqstate_t flags_;
56 CriticalSectionLocker()
57 : flags_(enter_critical_section())
60 ~CriticalSectionLocker()
62 leave_critical_section(flags_);
uavcan::uint64_t getUtcUSecFromCanInterrupt()