summaryrefslogtreecommitdiff
path: root/software/led_fade
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2017-05-04 05:46:05 -0700
committerMegan Wachs <megan@sifive.com>2017-05-04 05:46:05 -0700
commit4d5cbec9118cbedf2d4ae5b54acaa22862245a4c (patch)
treebb197ca9ef8f9265a79485f3a13e4e921a0ff93b /software/led_fade
parent3a01ac1b7c0e72c04679f0cd6552c4ff0b308863 (diff)
Update SDK For E31/E51 Coreplex IP Evaluation
Diffstat (limited to 'software/led_fade')
-rw-r--r--software/led_fade/led_fade.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/software/led_fade/led_fade.c b/software/led_fade/led_fade.c
index 775647a..3c7b8c8 100644
--- a/software/led_fade/led_fade.c
+++ b/software/led_fade/led_fade.c
@@ -6,6 +6,10 @@
#include <stdint.h>
#include "platform.h"
+#ifndef _SIFIVE_HIFIVE1_H
+#error "'led_fade' is designed to run on HiFive1 and/or E300 Arty Dev Kit."
+#endif
+
static const char led_msg[] = "\a\n\r\n\r\
55555555555555555555555555555555555555555555555\n\r\
5555555 Are the LEDs Changing? [y/n] 555555555\n\r\
@@ -118,7 +122,7 @@ int main (void){
GPIO_REG(GPIO_OUTPUT_XOR) |= (1 << RED_LED_OFFSET);
while(1){
- volatile uint64_t * now = (volatile uint64_t*)(CLINT_BASE_ADDR + CLINT_MTIME);
+ volatile uint64_t * now = (volatile uint64_t*)(CLINT_CTRL_ADDR + CLINT_MTIME);
volatile uint64_t then = *now + 100;
while (*now < then) { }