From 11a0da5c63faffd45bde43da2777a9771cfdf5e9 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 2 May 2011 14:33:05 -0400 Subject: /examples/ cleanups. --- examples/test-systick.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'examples/test-systick.cpp') diff --git a/examples/test-systick.cpp b/examples/test-systick.cpp index bbf0adf..78c7307 100644 --- a/examples/test-systick.cpp +++ b/examples/test-systick.cpp @@ -1,16 +1,11 @@ // Tests the SysTick enable/disable functions -// + #include "wirish.h" #include "systick.h" -#define LED_PIN BOARD_LED_PIN -#define PWM_PIN 2 -#define BUT BOARD_BUTTON_PIN - void setup() { - /* Set up the LED to blink */ - pinMode(LED_PIN, OUTPUT); - pinMode(BUT, INPUT); + pinMode(BOARD_LED_PIN, OUTPUT); + pinMode(BOARD_BUTTON_PIN, INPUT); } bool disable = true; @@ -24,7 +19,7 @@ void loop() { for(i = 0; i < 150000; i++) ; - if(isButtonPressed()) { + if (isButtonPressed()) { if (disable) { systick_disable(); SerialUSB.println("Disabling SysTick"); @@ -47,7 +42,7 @@ __attribute__((constructor)) void premain() { int main(void) { setup(); - while (1) { + while (true) { loop(); } return 0; -- cgit v1.2.3