at24cm0x
1.0
at24cm0x driver library
Toggle main menu visibility
Loading...
Searching...
No Matches
systick.h
Go to the documentation of this file.
1
19
20
#ifndef SYSTICK_H_
21
#define SYSTICK_H_
22
23
#include <util/atomic.h>
24
32
enum
SYSTICK_Timer_Status_t
33
{
34
SYSTICK_Timer_Running
= 0,
35
SYSTICK_Timer_Expired
36
};
37
42
typedef
enum
SYSTICK_Timer_Status_t
SYSTICK_Timer_Status
;
43
51
struct
SYSTICK_Timer_t
52
{
53
unsigned
int
expire
;
54
SYSTICK_Timer_Status
status
;
55
};
56
61
typedef
struct
SYSTICK_Timer_t
SYSTICK_Timer
;
62
63
void
systick_init
(
void
);
64
void
systick_reset
(
void
);
65
void
systick_tick
(
void
);
66
unsigned
int
systick_current
(
void
);
67
68
void
systick_timer_set
(
SYSTICK_Timer
*timer,
unsigned
int
delay_ticks);
69
SYSTICK_Timer_Status
systick_timer_elapsed
(
SYSTICK_Timer
*timer);
70
unsigned
int
systick_timer_remaining
(
SYSTICK_Timer
*timer);
71
void
systick_timer_wait
(
unsigned
int
ticks);
72
void
systick_timer_wait_ms
(
unsigned
int
ms);
73
void
systick_timer_wait_us
(
unsigned
int
us);
74
void
systick_timer_cancel
(
SYSTICK_Timer
*timer);
75
76
#endif
/* SYSTICK_H_ */
SYSTICK_Timer_t
Represents a SysTick software timer instance.
Definition
systick.h:52
SYSTICK_Timer_t::status
SYSTICK_Timer_Status status
Definition
systick.h:54
SYSTICK_Timer_t::expire
unsigned int expire
Definition
systick.h:53
systick_timer_elapsed
SYSTICK_Timer_Status systick_timer_elapsed(SYSTICK_Timer *timer)
Checks whether a SysTick software timer has expired.
Definition
systick.c:118
systick_reset
void systick_reset(void)
Resets the SysTick timer value.
Definition
systick.c:48
systick_timer_remaining
unsigned int systick_timer_remaining(SYSTICK_Timer *timer)
Returns the remaining time before a SysTick timer expires.
Definition
systick.c:142
SYSTICK_Timer
struct SYSTICK_Timer_t SYSTICK_Timer
Alias for struct SYSTICK_Timer_t representing a SysTick software timer.
Definition
systick.h:61
SYSTICK_Timer_Status
enum SYSTICK_Timer_Status_t SYSTICK_Timer_Status
Alias for enum SYSTICK_Timer_Status_t representing SysTick timer states.
Definition
systick.h:42
systick_timer_cancel
void systick_timer_cancel(SYSTICK_Timer *timer)
Cancels a running SysTick software timer.
Definition
systick.c:189
systick_current
unsigned int systick_current(void)
Returns the current SysTick tick counter value.
Definition
systick.c:76
systick_timer_set
void systick_timer_set(SYSTICK_Timer *timer, unsigned int delay_ticks)
Sets and starts a SysTick software timer.
Definition
systick.c:97
systick_init
void systick_init(void)
Initializes the SysTick timer module.
Definition
systick.c:35
systick_tick
void systick_tick(void)
Increments the SysTick timer tick counter.
Definition
systick.c:61
systick_timer_wait_ms
void systick_timer_wait_ms(unsigned int ms)
SYSTICK_Timer_Status_t
SYSTICK_Timer_Status_t
Represents the current status of the SysTick timer.
Definition
systick.h:33
SYSTICK_Timer_Running
@ SYSTICK_Timer_Running
Definition
systick.h:34
SYSTICK_Timer_Expired
@ SYSTICK_Timer_Expired
Definition
systick.h:35
systick_timer_wait_us
void systick_timer_wait_us(unsigned int us)
systick_timer_wait
void systick_timer_wait(unsigned int ticks)
Blocks execution for a specified number of SysTick ticks.
Definition
systick.c:168
utils
systick
systick.h
Generated by
1.17.0