Private
Public Access
2
0

mraa: add mraa_get_platform_name

getPlatformName for c++/swig API
Closes #35

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
Thomas Ingleby
2014-11-26 15:15:55 +00:00
parent 0289c63c4c
commit d1185efc0a
8 changed files with 55 additions and 0 deletions

View File

@@ -28,6 +28,7 @@
#include "common.h"
#include "intel_de3815.h"
#define PLATFORM_NAME "Intel DE3815"
#define MAX_SIZE 64
#define SYSFS_CLASS_GPIO "/sys/class/gpio"
@@ -38,6 +39,10 @@ mraa_intel_de3815()
if (b == NULL)
return NULL;
b->platform_name_length = strlen(PLATFORM_NAME) + 1;
b->platform_name = (char*) malloc(sizeof(char) * b->platform_name_length);
strncpy(b->platform_name, PLATFORM_NAME, b->platform_name_length);
b->phy_pin_count = 18;
//b->gpio_count = 14;
b->aio_count = 0;