timer.h File Reference
#include "pico.h"
#include "hardware/structs/timer.h"
Include dependency graph for timer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PARAM_ASSERTIONS_ENABLED_TIMER   0
 

Typedefs

typedef void(* hardware_alarm_callback_t) (uint alarm_num)
 

Functions

static void check_hardware_alarm_num_param (__unused uint alarm_num)
 
static uint32_t time_us_32 (void)
 Return a 32 bit timestamp value in microseconds. More...
 
uint64_t time_us_64 (void)
 Return the current 64 bit timestamp value in microseconds. More...
 
void busy_wait_us_32 (uint32_t delay_us)
 Busy wait wasting cycles for the given (32 bit) number of microseconds. More...
 
void busy_wait_us (uint64_t delay_us)
 Busy wait wasting cycles for the given (64 bit) number of microseconds. More...
 
void busy_wait_ms (uint32_t delay_ms)
 Busy wait wasting cycles for the given number of milliseconds. More...
 
void busy_wait_until (absolute_time_t t)
 Busy wait wasting cycles until after the specified timestamp. More...
 
static bool time_reached (absolute_time_t t)
 Check if the specified timestamp has been reached. More...
 
void hardware_alarm_claim (uint alarm_num)
 cooperatively claim the use of this hardware alarm_num More...
 
int hardware_alarm_claim_unused (bool required)
 cooperatively claim the use of this hardware alarm_num More...
 
void hardware_alarm_unclaim (uint alarm_num)
 cooperatively release the claim on use of this hardware alarm_num More...
 
bool hardware_alarm_is_claimed (uint alarm_num)
 Determine if a hardware alarm has been claimed. More...
 
void hardware_alarm_set_callback (uint alarm_num, hardware_alarm_callback_t callback)
 Enable/Disable a callback for a hardware timer on this core. More...
 
bool hardware_alarm_set_target (uint alarm_num, absolute_time_t t)
 Set the current target for the specified hardware alarm. More...
 
void hardware_alarm_cancel (uint alarm_num)
 Cancel an existing target (if any) for a given hardware_alarm. More...
 
void hardware_alarm_force_irq (uint alarm_num)
 Force and IRQ for a specific hardware alarm. More...