yarf 0.1
Yet Another RepRap Firmware
|
Real-time clock for counting the uptime and for providing a time base for periodic tasks. More...
#include "clock.h"
#include "yarf.h"
#include "fastio.h"
#include "scheduling/periodic.h"
#include "scheduling/periodic_notify.h"
#include "movement/advance.h"
#include "util/math.h"
#include <avr/interrupt.h>
#include <util/atomic.h>
Go to the source code of this file.
Defines | |
#define | TIMER_TICKS_PER_MS (F_CPU/8/1000) |
The number of ticks the hardware timer will take in one millisecond. | |
Functions | |
static void | timer1_init (void) |
Initializes the hardware timer. | |
ISR (TIMER1_COMPB_vect, ISR_NOBLOCK) | |
Interrupt service routine which is executed every millisecond. | |
void | clock_init (void) |
Initializes the clock component. | |
unsigned long | clock_millis (void) |
Returns the number of milliseconds passed since the clock was initialized. | |
Variables | |
static volatile unsigned long | millis |
The number of milliseconds passed since the clock was initialized. |
Real-time clock for counting the uptime and for providing a time base for periodic tasks.
Definition in file clock.c.