Commit 42f951

2026-03-29 14:20:27 Bob Green: -/-
programming/handling interrupts.md ..
@@ 23,11 23,10 @@
#include <stdio.h>
#include <machine.h>
- #define LEDS1 0xa0
- #define LEDS2 0x50
-
static unsigned int ticks = 0;
+ void twiddle_thumbs(void);
+
void ISR isr(void) {
ticks++;
@@ 38,6 37,7 @@
static int lednum = 2;
static int delta = 1;
+ /* create simple visual effect with some of the leds */
clear_led(lednum);
lednum += delta;
@@ 60,8 60,9 @@
_pit_set_counter(1000);
*pit_tsr = 1;
- set_isr_vector(ivr, isr);
+ set_isr_handler(ivr, isr);
+ /* Wait for a keypress */
while (!_char_available()) {
printf("%08x\r", ticks);
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9