summaryrefslogtreecommitdiff
path: root/ucoo/hal
diff options
context:
space:
mode:
Diffstat (limited to 'ucoo/hal')
-rw-r--r--ucoo/hal/i2c/i2c_hard.stm32.cc2
-rw-r--r--ucoo/hal/timer/timer.hh5
-rw-r--r--ucoo/hal/usb/test/Makefile2
-rw-r--r--ucoo/hal/usb/usb_driver.cc2
4 files changed, 8 insertions, 3 deletions
diff --git a/ucoo/hal/i2c/i2c_hard.stm32.cc b/ucoo/hal/i2c/i2c_hard.stm32.cc
index 22567c9..fa0266b 100644
--- a/ucoo/hal/i2c/i2c_hard.stm32.cc
+++ b/ucoo/hal/i2c/i2c_hard.stm32.cc
@@ -30,7 +30,7 @@
namespace ucoo {
/// Local trace.
-static Trace<CONFIG_UCOO_HAL_I2C_TRACE> i2c_trace;
+static Trace<CONFIG_UCOO_HAL_I2C_TRACE> i2c_trace ("i2c");
/// Information on I2C hardware structure.
struct i2c_hardware_t
diff --git a/ucoo/hal/timer/timer.hh b/ucoo/hal/timer/timer.hh
index ab0fa18..31f785f 100644
--- a/ucoo/hal/timer/timer.hh
+++ b/ucoo/hal/timer/timer.hh
@@ -23,6 +23,7 @@
// DEALINGS IN THE SOFTWARE.
//
// }}}
+#include <cstdio>
#if defined TARGET_stm32
# include "timer.stm32.hh"
@@ -44,6 +45,10 @@ struct TimerTraceTimestamp
{
e.timestamp = Timer::get_value ();
}
+ int dump (const Entry &e, const Entry &eprev, char *buf) const
+ {
+ return sprintf (buf, "[%+8d] ", static_cast<int> (e.timestamp - eprev.timestamp));
+ }
};
} // namespace ucoo
diff --git a/ucoo/hal/usb/test/Makefile b/ucoo/hal/usb/test/Makefile
index d4849df..cac90d8 100644
--- a/ucoo/hal/usb/test/Makefile
+++ b/ucoo/hal/usb/test/Makefile
@@ -4,6 +4,6 @@ TARGETS = stm32f4
PROGS = test_usb
test_usb_SOURCES = test_usb.cc
-MODULES = ucoo/hal/usb ucoo/hal/gpio
+MODULES = ucoo/hal/usb ucoo/hal/gpio ucoo/utils
include $(BASE)/build/top.mk
diff --git a/ucoo/hal/usb/usb_driver.cc b/ucoo/hal/usb/usb_driver.cc
index efd8e6c..e53fe2f 100644
--- a/ucoo/hal/usb/usb_driver.cc
+++ b/ucoo/hal/usb/usb_driver.cc
@@ -26,7 +26,7 @@
namespace ucoo {
-Trace<CONFIG_UCOO_HAL_USB_TRACE> usb_trace;
+Trace<CONFIG_UCOO_HAL_USB_TRACE> usb_trace ("usb");
void
UsbDriver::register_application (UsbApplication &app)