summaryrefslogtreecommitdiff
path: root/bus.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:37:39 +0900
committerroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:37:39 +0900
commit0744c2015b73fa6319cb486fca79cc2c83373985 (patch)
treeafa06e6040139084c60d724981133ce32bcd583d /bus.c
parentb6bb15deeba5ae52b822b776180dd06d5cb4ee6d (diff)
show FW version and controller type (BB or OL) at startupINSTRUMENT_6_2_03
Diffstat (limited to 'bus.c')
-rw-r--r--bus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bus.c b/bus.c
index 2e3bf60..ee0f8cb 100644
--- a/bus.c
+++ b/bus.c
@@ -17,6 +17,7 @@
#include <inttypes.h>
#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;