Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
mraa_result_t (*spi_init_pre) (int bus);
mraa_result_t (*spi_init_post) (mraa_spi_context spi);
+ mraa_result_t (*uart_init_pre) (int index);
mraa_result_t (*uart_init_post) (mraa_uart_context uart);
} mraa_adv_func_t;
mraa_uart_context
mraa_uart_init(int index)
{
+ if (advance_func->uart_init_pre != NULL) {
+ if (advance_func->uart_init_pre(index) != MRAA_SUCCESS)
+ return NULL;
+ }
+
if ( mraa_setup_uart(index) != MRAA_SUCCESS)
return NULL;