You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
511 B
23 lines
511 B
#include <avr/io.h>
|
|
#include "pacer.h"
|
|
|
|
static uint16_t pacer_period;
|
|
|
|
/* Initialise the pacer module. */
|
|
void pacer_init (uint16_t pacer_frequency)
|
|
{
|
|
/* TODO: initialise timer/counter peripheral the
|
|
same way as in lab2/lab2-ex2/timer.c but also calculate
|
|
the timer/counter value from the pacer frequency */
|
|
}
|
|
|
|
|
|
/* Pace a while loop. */
|
|
void pacer_wait (void)
|
|
{
|
|
|
|
/* TODO: Implement the same way as the timer_delay () function
|
|
lab2-except reset TCNT1 after the while loop. */
|
|
|
|
}
|