diff options
Diffstat (limited to 'bus.c')
-rw-r--r-- | bus.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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; |