Skip to content
Snippets Groups Projects
Commit 859c9361 authored by Sebastien Bourdeauducq's avatar Sebastien Bourdeauducq
Browse files

demo: add rofreq command

parent 80ae39d8
No related merge requests found
MMDIR=../.. MMDIR=../..
include $(MMDIR)/software/include.mak include $(MMDIR)/software/include.mak
OBJECTS=crt0.o main.o OBJECTS=crt0.o main.o tdc.o
SEGMENTS=-j .text -j .data -j .rodata SEGMENTS=-j .text -j .data -j .rodata
all: demo.bin demo.h0 demo.h1 demo.h2 demo.h3 all: demo.bin demo.h0 demo.h1 demo.h2 demo.h3
......
/* /*
* Milkymist SoC (Software) * Milkymist SoC (Software)
* Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq * Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
* Copyright (C) 2011 CERN
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -25,6 +26,8 @@ ...@@ -25,6 +26,8 @@
#include <hw/gpio.h> #include <hw/gpio.h>
#include <hw/uart.h> #include <hw/uart.h>
#include "tdc.h"
/* General address space functions */ /* General address space functions */
#define NUMBER_OF_BYTES_ON_A_LINE 16 #define NUMBER_OF_BYTES_ON_A_LINE 16
...@@ -213,9 +216,11 @@ static void do_command(char *c) ...@@ -213,9 +216,11 @@ static void do_command(char *c)
else if(strcmp(token, "mw") == 0) mw(get_token(&c), get_token(&c), get_token(&c)); else if(strcmp(token, "mw") == 0) mw(get_token(&c), get_token(&c), get_token(&c));
else if(strcmp(token, "mc") == 0) mc(get_token(&c), get_token(&c), get_token(&c)); else if(strcmp(token, "mc") == 0) mc(get_token(&c), get_token(&c), get_token(&c));
else if(strcmp(token, "crc") == 0) crc(get_token(&c), get_token(&c)); else if(strcmp(token, "crc") == 0) crc(get_token(&c), get_token(&c));
else if(strcmp(token, "reboot") == 0) reboot(); else if(strcmp(token, "reboot") == 0) reboot();
/* payload */
else if(strcmp(token, "rofreq") == 0) rofreq();
else if(strcmp(token, "") != 0) else if(strcmp(token, "") != 0)
printf("Command not found\n"); printf("Command not found\n");
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment