From 0744c2015b73fa6319cb486fca79cc2c83373985 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Jan 1970 09:37:39 +0900 Subject: show FW version and controller type (BB or OL) at startup --- bus.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bus.c') diff --git a/bus.c b/bus.c index 2e3bf60..ee0f8cb 100644 --- a/bus.c +++ b/bus.c @@ -17,6 +17,7 @@ #include #include "globals.h" #include "bus.h" +#include "version.h" #define GPIO_SYSFSPATH "/sys/class/gpio" #define GPIO_EXPORTNODE "export" @@ -356,6 +357,13 @@ void bus_init() globals.HWDetect.beaglebone = util_is_beaglebone(); globals.HWDetect.olimex = util_is_olimex(); + strcpy(globals.HWDetect.firmware,FW_VERSION); + if (globals.HWDetect.beaglebone) { + strcat(globals.HWDetect.firmware,"BB"); + } else if (globals.HWDetect.olimex) { + strcat(globals.HWDetect.firmware,"OL"); + } + globals.HWDetect.has_i2c = globals.HWDetect.beaglebone || globals.HWDetect.olimex; globals.HWDetect.has_gpmc = globals.HWDetect.beaglebone || globals.HWDetect.olimex; globals.HWDetect.has_gpio = globals.HWDetect.beaglebone || globals.HWDetect.olimex; -- cgit