maa: change the linking of maa and make gpio functions match maa_ spec
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
add_executable (i2c_HMC5883L i2c_HMC5883L.c)
|
||||
add_executable (hellomaa hellomaa.c)
|
||||
add_executable (cycle-pwm3 cycle-pwm3.c)
|
||||
add_executable (blink-io8 blink-io8.c)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/api ${PROJECT_SOURCE_DIR}/include)
|
||||
|
||||
target_link_libraries (hellomaa maa)
|
||||
target_link_libraries (i2c_HMC5883L maa m)
|
||||
target_link_libraries (cycle-pwm3 maa)
|
||||
target_link_libraries (blink-io8 maa)
|
||||
|
||||
@@ -24,20 +24,20 @@
|
||||
|
||||
#include "stdio.h"
|
||||
|
||||
#include "maa.h"
|
||||
#include "gpio.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
fprintf(stdout, "MAA Version: %d\n Starting Blinking on IO8", get_version());
|
||||
fprintf(stdout, "MAA Version: %d\n Starting Blinking on IO8", maa_get_version());
|
||||
gpio_t gpio;
|
||||
gpio_init(&gpio, 26);
|
||||
gpio_dir(&gpio, "out");
|
||||
maa_gpio_init(&gpio, 26);
|
||||
maa_gpio_dir(&gpio, "out");
|
||||
|
||||
while (1){
|
||||
gpio_write(&gpio, 0);
|
||||
maa_gpio_write(&gpio, 0);
|
||||
sleep(1);
|
||||
gpio_write(&gpio, 1);
|
||||
maa_gpio_write(&gpio, 1);
|
||||
sleep(1);
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "maa.h"
|
||||
#include "pwm.h"
|
||||
|
||||
int
|
||||
main ()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "maa.h"
|
||||
#include "i2c.h"
|
||||
#include "math.h"
|
||||
|
||||
#define MAX_BUFFER_LENGTH 6
|
||||
|
||||
Reference in New Issue
Block a user