12#include "pico/assert.h"
18typedef unsigned int uint;
21#ifndef PICO_OPAQUE_ABSOLUTE_TIME_T
22#define PICO_OPAQUE_ABSOLUTE_TIME_T 0
38#if PICO_OPAQUE_ABSOLUTE_TIME_T
40 uint64_t _private_us_since_boot;
53#if PICO_OPAQUE_ABSOLUTE_TIME_T
54 return t._private_us_since_boot;
68#if PICO_OPAQUE_ABSOLUTE_TIME_T
69 assert(us_since_boot <= INT64_MAX);
70 t->_private_us_since_boot = us_since_boot;
88#if !PICO_OPAQUE_ABSOLUTE_TIME_T
89#define ABSOLUTE_TIME_INITIALIZED_VAR(name, value) name = value
91#define ABSOLUTE_TIME_INITIALIZED_VAR(name, value) name = {value}
95#ifndef PICO_INCLUDE_RTC_DATETIME
96#define PICO_INCLUDE_RTC_DATETIME PICO_RP2040
99#if PICO_INCLUDE_RTC_DATETIME
118#define bool_to_bit(x) ((uint)!!(x))
static uint64_t to_us_since_boot(absolute_time_t t)
convert an absolute_time_t into a number of microseconds since boot.
Definition types.h:52
static absolute_time_t from_us_since_boot(uint64_t us_since_boot)
convert a number of microseconds since boot to an absolute_time_t
Definition types.h:82
static void update_us_since_boot(absolute_time_t *t, uint64_t us_since_boot)
update an absolute_time_t value to represent a given number of microseconds since boot
Definition types.h:67
uint64_t absolute_time_t
An opaque 64 bit timestamp in microseconds.
Definition types.h:43