#include "mraa_func.h"
#include "mraa_adv_func.h"
+// Bionic does not implement pthread cancellation API
+#ifndef __BIONIC__
+#define HAVE_PTHREAD_CANCEL
+#endif
+
// general status failures for internal functions
#define MRAA_PLATFORM_NO_INIT -3
#define MRAA_IO_SETUP_FAILURE -2
void *isr_args; /**< args return when interupt service request triggered */
pthread_t thread_id; /**< the isr handler thread id */
int isr_value_fp; /**< the isr file pointer on the value */
+#ifndef HAVE_PTHREAD_CANCEL
+ int isr_control_pipe[2]; /**< a pipe used to interrupt the isr from polling the value fd*/
+#endif
+ mraa_boolean_t isr_thread_terminating; /**< is the isr thread being terminated? */
mraa_boolean_t owner; /**< If this context originally exported the pin */
mraa_result_t (*mmap_write) (mraa_gpio_context dev, int value);
int (*mmap_read) (mraa_gpio_context dev);
};
/**
+ * A structure reprensting an IIO device
+ */
+struct _iio {
+ int num; /**< IIO device number */
+};
+
+/**
* A bitfield representing the capabilities of a pin.
*/
typedef struct {
unsigned int def_uart_dev; /**< Position in array of defult uart */
unsigned int uart_dev_count; /**< Usable spi Count */
mraa_uart_dev_t uart_dev[6]; /**< Array of UARTs */
+ mraa_boolean_t no_bus_mux; /**< i2c/spi/adc/pwm/uart bus muxing setup not required */
int pwm_default_period; /**< The default PWM period is US */
int pwm_max_period; /**< Maximum period in us */
int pwm_min_period; /**< Minimum period in us */