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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user