37#ifndef _RTEMS_SAPI_COUNTER_H
38#define _RTEMS_SAPI_COUNTER_H
40#include <rtems/score/cpu.h>
83static inline uint32_t rtems_counter_frequency(
void )
115 return second - first;
rtems_counter_ticks rtems_counter_sbintime_to_ticks(int64_t sbt)
Converts signed binary time (sbintime_t) into counter ticks.
Definition: cpucounterconverter.c:65
uint64_t rtems_counter_ticks_to_nanoseconds(rtems_counter_ticks ticks)
Converts counter ticks into nanoseconds.
Definition: cpucounterconverter.c:50
int64_t rtems_counter_ticks_to_sbintime(rtems_counter_ticks ticks)
Converts counter ticks into signed binary time (sbintime_t).
Definition: cpucounterconverter.c:60
rtems_counter_ticks rtems_counter_nanoseconds_to_ticks(uint32_t nanoseconds)
Converts nanoseconds into counter ticks.
Definition: cpucounterconverter.c:55
void rtems_counter_delay_nanoseconds(uint32_t nanoseconds)
Busy wait for some nanoseconds.
Definition: delaynano.c:43
void rtems_counter_initialize_converter(uint32_t frequency)
Initializes the counter ticks to/from nanoseconds converter functions.
Definition: cpucounterconverter.c:70
void rtems_counter_delay_ticks(rtems_counter_ticks ticks)
Busy wait for some counter ticks.
Definition: delayticks.c:43
CPU_Counter_ticks rtems_counter_ticks
Unsigned integer type for counter values.
Definition: counter.h:76
uint32_t _CPU_Counter_frequency(void)
Gets the current CPU counter frequency in Hz.
Definition: system-clocks.c:125
CPU_Counter_ticks _CPU_Counter_read(void)
Gets the current CPU counter value.
Definition: system-clocks.c:130