aboutsummaryrefslogtreecommitdiff
path: root/examples/test-systick.cpp
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-05-02 14:33:05 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-05-04 13:31:24 -0400
commit1634a4855e3d5bf8e3cda2ecb0f4e5f384d057af (patch)
tree5cf246a27d1f02ec959893fb62fd8aa754a11e8e /examples/test-systick.cpp
parentc436ffa1bbe0491738d19b06c2618935603b424f (diff)
/examples/ cleanups.
Diffstat (limited to 'examples/test-systick.cpp')
-rw-r--r--examples/test-systick.cpp15
1 files changed, 5 insertions, 10 deletions
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;