diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-06-05 20:28:32 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-06-05 20:28:32 +0200 |
commit | 97a104555de59091124a854cad3a5a4ff6bd285b (patch) | |
tree | f3f0bcb9cdcaa908bc3384da1759bef6998acf40 /src/common/includes | |
parent | ff3d9f84a14ca5c2d4c44bf946b0f0def8abe6b6 (diff) | |
download | glutte-o-matic-97a104555de59091124a854cad3a5a4ff6bd285b.tar.gz glutte-o-matic-97a104555de59091124a854cad3a5a4ff6bd285b.tar.bz2 glutte-o-matic-97a104555de59091124a854cad3a5a4ff6bd285b.zip |
Fix USART concurrency, create common usart object
Diffstat (limited to 'src/common/includes')
-rw-r--r-- | src/common/includes/GPIO/usart.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/common/includes/GPIO/usart.h b/src/common/includes/GPIO/usart.h index 21936d7..0ad1034 100644 --- a/src/common/includes/GPIO/usart.h +++ b/src/common/includes/GPIO/usart.h @@ -31,6 +31,14 @@ #ifndef __USART_H_ #define __USART_H_ +#ifdef STM32F4XX +# include <stm32f4xx_usart.h> +#else +# define USART_TypeDef int +# define USART2 ((USART_TypeDef*)2) +# define USART3 ((USART_TypeDef*)3) +#endif + #define MAX_NMEA_SENTENCE_LEN 256 // Initialise USART2 for PC debugging @@ -48,7 +56,7 @@ void usart_debug(const char *format, ...); // Send a string to the PC void usart_debug_puts(const char* str); -void usart_debug_puts_no_header(const char* str); +void usart_debug_puts_header(const char* hdr, const char* str); // Get a MAX_NMEA_SENTENCE_LEN sized NMEA sentence // Return 1 on success |