Tested on Linaro 4.9.39
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install autoconf libtool automake bison python-dev swig libasound2-dev
#include "i2c.h" | |
// File handlers if all I2C | |
#define I2C_MAX_BUS_COUNT 4 | |
// initalize every counter to zero | |
static int I2C_FH[I2C_MAX_BUS_COUNT]; | |
// Keeps a refernce counter of all used FH | |
static int I2C_FH_RC[I2C_MAX_BUS_COUNT] = { 0 }; | |
int I2cOpen(int bus) { |
#include "gpio.h" | |
uint16_t GpioDB410cMapping(uint16_t pin) { | |
// only pin 23-34 | |
if (pin < 23 || pin > 34) { | |
printf("ERROR: Pin %d does not have a GPIO pin mapped\n", pin); | |
return 0; | |
} | |
switch(pin) { |
package main | |
import ( | |
"fmt" | |
"os/exec" | |
"strings" | |
) | |
func run(args ...string) { | |
cmd := exec.Command("adb", args...) |