summaryrefslogtreecommitdiff
path: root/software/first/first.c
blob: e04d501a2b51ffa65b85d6e99b1928bf51d25bbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Copyright 2019 SiFive, Inc */
/* SPDX-License-Identifier: Apache-2.0 */

#include <stdio.h>
#include "super_blink.h"

int main() {
		setup_GPIO();
		setup_timer_irq();

		// set a delay so the first interrupt handler can fire
		delay(DELAY);

		while (1) {
			// the idea being that delay sets the timer
			// for the first interrupt. In the interrupt
			// routine, we set the next delay so all we need
			// to do here is to loop endlessly
			wait_for_irq();
		}
}