123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- #ifndef CHTM_H
- #define CHTM_H
- #if (CH_CFG_USE_TM == TRUE) || defined(__DOXYGEN__)
- #if PORT_SUPPORTS_RT == FALSE
- #error "CH_CFG_USE_TM requires PORT_SUPPORTS_RT"
- #endif
- typedef struct {
-
- rtcnt_t offset;
- } tm_calibration_t;
- typedef struct {
- rtcnt_t best;
- rtcnt_t worst;
- rtcnt_t last;
- ucnt_t n;
- rttime_t cumulative;
- } time_measurement_t;
- #ifdef __cplusplus
- extern "C" {
- #endif
- void _tm_init(void);
- void chTMObjectInit(time_measurement_t *tmp);
- NOINLINE void chTMStartMeasurementX(time_measurement_t *tmp);
- NOINLINE void chTMStopMeasurementX(time_measurement_t *tmp);
- NOINLINE void chTMChainMeasurementToX(time_measurement_t *tmp1,
- time_measurement_t *tmp2);
- #ifdef __cplusplus
- }
- #endif
- #endif
- #endif
|