X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/517dd479c063e0db2d1a53d92e4202988270e74d..64f3f4c19cc280c2bff7ee57d5bcdda036dfcbf8:/main.c diff --git a/main.c b/main.c index 6d5c158..bb2c280 100644 --- a/main.c +++ b/main.c @@ -7,7 +7,7 @@ Software License Agreement (BSD License) - Copyright (c) 2011, microBuilder SARL + Copyright (c) 2012, microBuilder SARL All rights reserved. Redistribution and use in source and binary forms, with or without @@ -33,10 +33,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************/ -#include -#include -#include - #include "projectconfig.h" #include "sysinit.h" @@ -60,7 +56,7 @@ int main(void) uint32_t currentSecond, lastSecond; currentSecond = lastSecond = 0; - + while (1) { // Toggle LED once per second @@ -68,7 +64,7 @@ int main(void) if (currentSecond != lastSecond) { lastSecond = currentSecond; - gpioSetValue(CFG_LED_PORT, CFG_LED_PIN, ~(gpioGetValue(CFG_LED_PORT, CFG_LED_PIN))); + gpioSetValue(CFG_LED_PORT, CFG_LED_PIN, lastSecond % 2); } // Poll for CLI input if CFG_INTERFACE is enabled in projectconfig.h