mraa.c: Add mraa_get_platform_version call
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
|
||||
* Copyright (c) 2014 Intel Corporation.
|
||||
* Brendan Le Foll <brendan.le.foll@intel.com>
|
||||
* Copyright (c) 2014-2016 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -1173,6 +1174,7 @@ mraa_intel_edison_fab_c()
|
||||
b->phy_pin_count = 20;
|
||||
b->gpio_count = 14;
|
||||
b->aio_count = 6;
|
||||
b->platform_version = "arduino";
|
||||
|
||||
b->adv_func = (mraa_adv_func_t*) calloc(1, sizeof(mraa_adv_func_t));
|
||||
if (b->adv_func == NULL) {
|
||||
|
||||
@@ -84,7 +84,7 @@ mraa_get_pin_index(mraa_board_t* board, char* name, int* pin_index)
|
||||
}
|
||||
|
||||
mraa_board_t*
|
||||
mraa_intel_minnowboard_byt_compatible()
|
||||
mraa_intel_minnowboard_byt_compatible(mraa_boolean_t turbot)
|
||||
{
|
||||
mraa_board_t* b = (mraa_board_t*) calloc(1, sizeof(mraa_board_t));
|
||||
|
||||
@@ -96,6 +96,11 @@ mraa_intel_minnowboard_byt_compatible()
|
||||
}
|
||||
|
||||
b->platform_name = PLATFORM_NAME;
|
||||
if (turbot) {
|
||||
b->platform_version = "Turbot";
|
||||
} else {
|
||||
b->platform_version = "Ax";
|
||||
}
|
||||
b->phy_pin_count = MRAA_INTEL_MINNOW_MAX_PINCOUNT;
|
||||
b->gpio_count = MRAA_INTEL_MINNOW_MAX_PINCOUNT;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
|
||||
* Copyright (c) 2014 Intel Corporation.
|
||||
* Brendan Le Foll <brendan.le.foll@intel.com>
|
||||
* Copyright (c) 2014-2016 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -64,19 +65,19 @@ mraa_x86_platform()
|
||||
plat = mraa_intel_nuc5();
|
||||
} else if (strncmp(line, "NOTEBOOK", 8) == 0) {
|
||||
platform_type = MRAA_INTEL_MINNOWBOARD_MAX;
|
||||
plat = mraa_intel_minnowboard_byt_compatible();
|
||||
plat = mraa_intel_minnowboard_byt_compatible(0);
|
||||
} else if (strncasecmp(line, "MinnowBoard MAX", 15) == 0) {
|
||||
platform_type = MRAA_INTEL_MINNOWBOARD_MAX;
|
||||
plat = mraa_intel_minnowboard_byt_compatible();
|
||||
plat = mraa_intel_minnowboard_byt_compatible(0);
|
||||
} else if (strncasecmp(line, "Galileo", 7) == 0) {
|
||||
platform_type = MRAA_INTEL_GALILEO_GEN1;
|
||||
plat = mraa_intel_galileo_rev_d();
|
||||
} else if (strncasecmp(line, "MinnowBoard Compatible", 22) == 0) {
|
||||
platform_type = MRAA_INTEL_MINNOWBOARD_MAX;
|
||||
plat = mraa_intel_minnowboard_byt_compatible();
|
||||
plat = mraa_intel_minnowboard_byt_compatible(1);
|
||||
} else if (strncasecmp(line, "MinnowBoard Turbot", 18) == 0) {
|
||||
platform_type = MRAA_INTEL_MINNOWBOARD_MAX;
|
||||
plat = mraa_intel_minnowboard_byt_compatible();
|
||||
plat = mraa_intel_minnowboard_byt_compatible(1);
|
||||
} else {
|
||||
syslog(LOG_ERR, "Platform not supported, not initialising");
|
||||
platform_type = MRAA_UNKNOWN_PLATFORM;
|
||||
|
||||
Reference in New Issue
Block a user