Go to the documentation of this file.
19 #include <util/atomic.h>
37 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
67 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
68 if (counterID == SYSTEM_COUNTER) {
81 sizeof(elapsedValue));
89 if (
OS_EXTENDED && (value == NULL || elapsedValue == NULL)) {
103 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
104 if (counterID == SYSTEM_COUNTER) {
111 if (currentValue >= *value) {
112 *elapsedValue = currentValue - *value;
117 *value = currentValue;
enum StatusType_e StatusType
Type for status.
@ HARDWARE
Counter is implemented in hardware.
Schedule tables management.
uint64_t TickType
Data type of counter values.
TickType * TickRefType
Reference to counter values.
enum counters_e CounterType
Type for counter reference.
volatile uint32_t sysTick
Current system tick.
#define OS_SET_ERROR_INFO1(serviceId, paramPtr1, size1)
Set error info with up to one parameter.
void ScheduleTable_handleTick(CounterType counter)
Handle tick.
const TickType maxallowedvalue
Maximum allowed value of counter.
StatusType Counter_IncrementCounter(CounterType counterID)
Increment counter.
@ OSServiceId_IncrementCounter
void Alarm_evaluateAlarm(CounterType counter)
Evaluate alarms with user generated counter.
StatusType Counter_GetCounterValue(CounterType counterID, TickRefType value)
Read current counter value.
TickType value
Current tick value of counter.
#define OS_SET_ERROR_INFO3(serviceId, paramPtr1, size1, paramPtr2, size2, paramPtr3, size3)
Set error info with up to three parameters.
volatile struct counter_s * Counter_Cfg[]
Current counter control blocks.
#define OS_SET_ERROR_INFO2(serviceId, paramPtr1, size1, paramPtr2, size2)
Set error info with up to two parameters.
Operating System Control Block.
#define OS_CALL_ERROR_HOOK(error)
Call error hook if configured.
@ OSServiceId_GetCounterValue
@ OSServiceId_GetElapsedValue
StatusType Counter_GetElapsedValue(CounterType counterID, TickRefType value, TickRefType elapsedValue)
Get elapse counter value.