blob: 78261ffc4fbde3c7a63677ba4f55a0d0acc73324 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
* activity10.c
*
* Created on: Oct 28, 2025
* Author: sowgro
*/
// create a clock that prints once per second using interrupts
// configure systick handler for interrupts
// write interrupt handler
// print every second
#include "systick.h"
#include <stdio.h>
void activity10_run() {
init_systick();
}
void SysTick_Handler() {
static int i = 0;
i++;
if (!(i & 1023)) {
printf("%d\r\n", i>>10);
}
}
|