mraa: rename from maa to mraa
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
@@ -24,34 +24,34 @@
|
||||
|
||||
#include "stdio.h"
|
||||
#include <string.h>
|
||||
#include "maa/gpio.h"
|
||||
#include "mraa/gpio.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
maa_platform_t platform = maa_get_platform_type();
|
||||
maa_gpio_context gpio;
|
||||
mraa_platform_t platform = mraa_get_platform_type();
|
||||
mraa_gpio_context gpio;
|
||||
char board_name[] = "Some weird devboard that isn't recognised...";
|
||||
int ledstate = 0;
|
||||
|
||||
switch (platform) {
|
||||
case MAA_INTEL_GALILEO_GEN1:
|
||||
case MRAA_INTEL_GALILEO_GEN1:
|
||||
strcpy(board_name, "Intel Galileo Gen1");
|
||||
gpio = maa_gpio_init_raw(3);
|
||||
gpio = mraa_gpio_init_raw(3);
|
||||
break;
|
||||
case MAA_INTEL_GALILEO_GEN2:
|
||||
case MRAA_INTEL_GALILEO_GEN2:
|
||||
strcpy(board_name, "Intel Galileo Gen2");
|
||||
default:
|
||||
gpio = maa_gpio_init(13);
|
||||
gpio = mraa_gpio_init(13);
|
||||
}
|
||||
|
||||
fprintf(stdout, "Welcome to libmaa\n Version: %s\n Running on %d",
|
||||
maa_get_version(), board_name);
|
||||
fprintf(stdout, "Welcome to libmraa\n Version: %s\n Running on %d",
|
||||
mraa_get_version(), board_name);
|
||||
|
||||
maa_gpio_dir(gpio, MAA_GPIO_OUT);
|
||||
mraa_gpio_dir(gpio, MRAA_GPIO_OUT);
|
||||
for (;;) {
|
||||
ledstate = !ledstate;
|
||||
maa_gpio_write(gpio, !ledstate);
|
||||
mraa_gpio_write(gpio, !ledstate);
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user