yarf 0.1
Yet Another RepRap Firmware
|
The real-time timer is a high resolution, high priority timer which is used for controlling the rate at which the stepper motors are stepped. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | realtime_task_t |
Structure for tasks that can be scheduled with the real-time timer. More... | |
Defines | |
#define | RTTIMER_TICKS_PER_MIN (F_CPU/8L*60L) |
The number of ticks the real-time timer takes in one minute. | |
#define | RTTIMER_SUCCESS 0 |
'Success' return value. | |
#define | RTTIMER_BUSY -1 |
'Busy' return value. | |
#define | RTTIMER_NOT_RUNNING -2 |
'Not running' return value. | |
Functions | |
void | rttimer_init (void) |
Initializes the real-time timer component. | |
int | rttimer_schedule_ticks (realtime_task_t *t, uint16_t ticks) |
Schedules a task to be executed after a specified number of ticks. | |
int | rttimer_cancel (void) |
Cancels the currently scheduled task. |
The real-time timer is a high resolution, high priority timer which is used for controlling the rate at which the stepper motors are stepped.
Definition in file realtime_timer.h.
int rttimer_cancel | ( | void | ) |
Cancels the currently scheduled task.
Definition at line 153 of file realtime_timer.c.
void rttimer_init | ( | void | ) |
Initializes the real-time timer component.
This should only be called once on boot.
Definition at line 121 of file realtime_timer.c.
int rttimer_schedule_ticks | ( | realtime_task_t * | t, |
uint16_t | ticks | ||
) |
Schedules a task to be executed after a specified number of ticks.
t | pointer to the task to be executed |
ticks | the number of ticks to wait before executing the task |
Definition at line 138 of file realtime_timer.c.