nanohub: add VERBOSE log level and move some logging to it
Move frequently logged messages to VERBOSE level
Test: build
Change-Id: Idc17d45711d6c8d06ff8bab04f99677909a00ce2
Signed-off-by: Ben Fennema <[email protected]>
diff --git a/firmware/os/drivers/vsync/vsync.c b/firmware/os/drivers/vsync/vsync.c
index 68147b0..9d76759 100644
--- a/firmware/os/drivers/vsync/vsync.c
+++ b/firmware/os/drivers/vsync/vsync.c
@@ -49,6 +49,10 @@
#error "VSYNC_IRQ is not defined; please define in variant.h"
#endif
+#define VERBOSE_PRINT(fmt, ...) do { \
+ osLog(LOG_VERBOSE, "%s " fmt, "[VSYNC]", ##__VA_ARGS__); \
+ } while (0);
+
#define INFO_PRINT(fmt, ...) do { \
osLog(LOG_INFO, "%s " fmt, "[VSYNC]", ##__VA_ARGS__); \
} while (0);
@@ -149,7 +153,7 @@
static bool vsyncPower(bool on, void *cookie)
{
- INFO_PRINT("power %d\n", on);
+ VERBOSE_PRINT("power %d\n", on);
if (on) {
extiClearPendingGpio(mTask.pin);
@@ -171,13 +175,13 @@
static bool vsyncSetRate(uint32_t rate, uint64_t latency, void *cookie)
{
- INFO_PRINT("setRate\n");
+ VERBOSE_PRINT("setRate\n");
return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency);
}
static bool vsyncFlush(void *cookie)
{
- INFO_PRINT("flush\n");
+ VERBOSE_PRINT("flush\n");
return osEnqueueEvt(sensorGetMyEventType(SENS_TYPE_VSYNC), SENSOR_DATA_EVENT_FLUSH, NULL);
}