From 6127963db75cb36db8cb19a1d2d53423375a1ac4 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Tue, 15 Apr 2014 17:22:45 +0400 Subject: [PATCH] LPC11C24: CAN bouncer (test) --- .../lpc11c24/test_olimex_lpc_p11c24/src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/main.cpp b/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/main.cpp index be95edbb94..1d4830a57f 100644 --- a/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/main.cpp +++ b/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/main.cpp @@ -8,7 +8,7 @@ #define ENFORCE(x) \ if ((x) == 0) { \ - while (true) { } \ + while (true) { board::setErrorLed(true); } \ } int main() @@ -20,7 +20,7 @@ int main() while (true) { - for (volatile int i = 0; i < 2000000; i++) { __asm volatile ("nop"); } + //for (volatile int i = 0; i < 2000000; i++) { __asm volatile ("nop"); } board::setErrorLed(uavcan_lpc11c24::CanDriver::instance().getErrorCount() > 0); @@ -34,6 +34,7 @@ int main() ENFORCE(1 == uavcan_lpc11c24::CanDriver::instance().receive(frm, mono, utc, flags)); asm volatile ("nop"); + frm.id += 0x100; ENFORCE(1 == uavcan_lpc11c24::CanDriver::instance().send(frm, mono, 0)); } else