4 Replies Latest reply on Nov 30, 2015 10:02 AM by arfoll

    How to transfer data using Uart in Galileo Gen 2




      I tried the below coding to transfer data from Intel Galileo Gen 2 to uart. But some error comes after building  in Eclipse


      #define EXIT_SUCCESS 1
      int main(int argc, char** argv)
           char tx_data[]="hello";
           char rx_data[]="";
           mraa_uart_context uart1;
           mraa_uart_write(uart1 ,tx_data, sizeof(tx_data));
           //fprintf(stdout, "Gpio is %d\n",mraa_uart_write(uart1 ,tx_data, 4));
           mraa_uart_read(uart1 ,rx_data, sizeof(rx_data));
           return EXIT_SUCCESS ;


      after building time the following error coming.

      In file included from ..\src\tx.c:4:0:

      C:\iotdk-ide-win\devkit-x86\sysroots\i586-poky-linux/usr/include/mraa/uart.h:47:75: error: unknown type name 'mraa_uart_parity_t'

           mraa_result_t mraa_uart_set_mode(mraa_uart_context dev, int bytesize, mraa_uart_parity_t parity, int stopbits);