summaryrefslogtreecommitdiff
path: root/bus.c
diff options
context:
space:
mode:
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;