31 #define MRAA_PLATFORM_NAME_MAX_SIZE 64 33 #define MRAA_PIN_NAME_SIZE 12 36 #define MRAA_SUB_PLATFORM_BIT_SHIFT 9 38 #define MRAA_SUB_PLATFORM_MASK (1<<MRAA_SUB_PLATFORM_BIT_SHIFT) 41 #define MRAA_MAIN_PLATFORM_OFFSET 0 43 #define MRAA_SUB_PLATFORM_OFFSET 1 47 #define MRAA_RETURN_FOR_ERROR(func) do { \ 50 if (res != MRAA_SUCCESS) \ 57 #define DEPRECATED __attribute__((deprecated)) 58 #elif defined(_MSC_VER) 59 #define DEPRECATED __declspec(deprecated) 61 #pragma message("WARNING: You need to implement DEPRECATED for this compiler") 89 #if (defined SWIGPYTHON) || (defined SWIG) int mraa_get_platform_combined_type()
int mraa_spi_lookup(const char *spi_name)
int mraa_get_spi_bus_count()
int mraa_i2c_lookup(const char *i2c_name)
mraa_result_t mraa_remove_subplatform(mraa_platform_t subplatformtype)
int mraa_gpio_lookup(const char *pin_name)
const char * mraa_get_version()
unsigned int mraa_get_platform_adc_raw_bits(uint8_t platform_offset)
void mraa_deinit() __attribute__((destructor))
const char * mraa_get_platform_name()
unsigned int mraa_boolean_t
Definition: common.h:78
mraa_platform_t
Definition: types.h:39
mraa_platform_t mraa_get_platform_type()
mraa_boolean_t mraa_pin_mode_test(int pin, mraa_pinmodes_t mode)
unsigned int mraa_get_platform_adc_supported_bits(int platform_offset)
int mraa_get_sub_platform_index(int pin_or_bus_id)
unsigned int mraa_adc_supported_bits()
int mraa_get_i2c_bus_count()
int mraa_get_i2c_bus_id(int i2c_bus)
mraa_boolean_t mraa_is_sub_platform_id(int pin_or_bus_id)
int mraa_set_priority(const int priority)
char * mraa_get_pin_name(int pin)
int mraa_get_uart_count()
mraa_result_t mraa_init_json_platform(const char *path)
mraa_result_t mraa_init() __attribute__((constructor))
int mraa_uart_lookup(const char *uart_name)
mraa_result_t mraa_add_subplatform(mraa_platform_t subplatformtype, const char *dev)
int mraa_pwm_lookup(const char *pwm_name)
int mraa_get_sub_platform_id(int pin_or_bus_index)
int mraa_get_gpio_count()
unsigned int mraa_adc_raw_bits()
mraa_result_t
Definition: types.h:209
void * mraa_init_io(const char *desc)
mraa_pinmodes_t
Definition: types.h:232
const char * mraa_get_platform_version(int platform_offset)
mraa_boolean_t mraa_has_sub_platform()
unsigned int mraa_get_platform_pin_count(uint8_t platform_offset)
void mraa_result_print(mraa_result_t result)
mraa_result_t mraa_set_log_level(int level)
int mraa_get_default_i2c_bus(uint8_t platform_offset)
unsigned int mraa_get_pin_count()