mraa: rename from maa to mraa
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
@@ -24,31 +24,31 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "maa.h"
|
||||
#include "mraa.h"
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
maa_init();
|
||||
mraa_init();
|
||||
//! [Interesting]
|
||||
maa_pwm_context pwm;
|
||||
pwm = maa_pwm_init(3);
|
||||
mraa_pwm_context pwm;
|
||||
pwm = mraa_pwm_init(3);
|
||||
if (pwm == NULL) {
|
||||
return 1;
|
||||
}
|
||||
maa_pwm_period_us(pwm, 200);
|
||||
maa_pwm_enable(pwm, 1);
|
||||
mraa_pwm_period_us(pwm, 200);
|
||||
mraa_pwm_enable(pwm, 1);
|
||||
|
||||
float value = 0.0f;
|
||||
|
||||
while (1) {
|
||||
value = value + 0.01f;
|
||||
maa_pwm_write(pwm, value);
|
||||
mraa_pwm_write(pwm, value);
|
||||
usleep(50000);
|
||||
if (value >= 1.0f) {
|
||||
value = 0.0f;
|
||||
}
|
||||
float output = maa_pwm_read(pwm);
|
||||
float output = mraa_pwm_read(pwm);
|
||||
}
|
||||
//! [Interesting]
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user