From 6a5e19e6077b1dd1f5d2076b0a63dfef1c04de1d Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 17 Jul 2010 17:46:42 +0200 Subject: add simple counter program --- src/binwatch/counter.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/binwatch/counter.c (limited to 'src/binwatch/counter.c') diff --git a/src/binwatch/counter.c b/src/binwatch/counter.c new file mode 100644 index 0000000..fe1bd1f --- /dev/null +++ b/src/binwatch/counter.c @@ -0,0 +1,37 @@ +/* main.c */ +/* binwatch - Tiny binary wristwatch. {{{ + * + * Copyright (C) 2010 Nicolas Schodet + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contact : + * Web: http://ni.fr.eu.org/ + * Email: + * }}} */ +#include "common.h" +#include "common/led.h" + +int +main (void) +{ + uint16_t i; + while (1) + { + for (i = 0; i < 1024; i++) + led_display (i, 20); + } +} + -- cgit v1.2.3