|
From: | Gautier Hattenberger |
Subject: | Re: [Paparazzi-devel] modules with UART |
Date: | Sat, 19 Jul 2014 10:21:56 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Hi,The uart is usually used with the datalink system, barely never directly. But it is possible. You need to include mcu_perpih/uart.h, add the compilation flag USE_UARTX to tell which uart you want to use, and then you can use the macros UARTXxxxxx(). You normally don't need to do the init, but you might need to change the baudrate.
Then you haveUARTXCheckFreeSpace(_x) to check if you have enough space in the buffer before sending.
UARTXTransmit(_c) to send a byte. UARTXChAvailable() to check if you have new bytes in the reception buffer. UARTXGetch() to retrieve the next byte. Gautier Le 18/07/2014 10:40, Jimmy a écrit :
Hello everybody, I want to add a new modules which will link with UART,but I found there are many modules linking with I2c,ADC(such as Airspeed,Infrared,AOA...).I also found the GPS linking with UART,but it's too complex and it's difficult to find a reference(such as .c file .h file and the .xml file). If threre is anyone have studied this before,and would you mind give me some suggestion? Any help would be greatly appreciated. -- View this message in context: http://lists.paparazziuav.org/modules-with-UART-tp15830.html Sent from the paparazzi-devel mailing list archive at Nabble.com. _______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
[Prev in Thread] | Current Thread | [Next in Thread] |