timing_pal.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include "timing_pal_mapping.h"
#include "status.h"
#include "callbacks.h"

Go to the source code of this file.

Data Structures

struct  timer_chan_config_t
 Structure to configure the channel timer notification. More...
 
struct  timer_config_t
 Timer configuration structure. More...
 

Enumerations

enum  timer_resolution_type_t { TIMER_RESOLUTION_TYPE_NANOSECOND, TIMER_RESOLUTION_TYPE_MICROSECOND, TIMER_RESOLUTION_TYPE_MILISECOND }
 Type options available for tick resolution. More...
 
enum  timer_chan_type_t { TIMER_CHAN_TYPE_CONTINUOUS, TIMER_CHAN_TYPE_ONESHOT }
 Type options available for timer channel notification. More...
 

Functions

status_t TIMING_Init (const timing_instance_t *const instance, const timer_config_t *const config)
 Initialize the timer instance and timer channels with value from input configuration structure. More...
 
void TIMING_Deinit (const timing_instance_t *const instance)
 De-initialize a timer instance. More...
 
void TIMING_StartChannel (const timing_instance_t *const instance, const uint8_t channel, const uint32_t periodTicks)
 Starts the timer channel counting. More...
 
void TIMING_StopChannel (const timing_instance_t *const instance, const uint8_t channel)
 Stop the timer channel counting. More...
 
uint32_t TIMING_GetElapsed (const timing_instance_t *const instance, const uint8_t channel)
 Get elapsed ticks. More...
 
uint32_t TIMING_GetRemaining (const timing_instance_t *const instance, const uint8_t channel)
 Get remaining ticks. More...
 
void TIMING_EnableNotification (const timing_instance_t *const instance, const uint8_t channel)
 Enable channel notifications. More...
 
void TIMING_DisableNotification (const timing_instance_t *const instance, const uint8_t channel)
 Disable channel notifications. More...
 
status_t TIMING_GetResolution (const timing_instance_t *const instance, const timer_resolution_type_t type, uint64_t *const resolution)
 Get tick resolution. More...
 
status_t TIMING_GetMaxPeriod (const timing_instance_t *const instance, const timer_resolution_type_t type, uint64_t *const maxPeriod)
 Get max period in engineering units. More...