diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-16 20:46:12 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-20 10:19:14 +0200 |
commit | d1f674cc2c05412ea9fa0de21cab777711c6331a (patch) | |
tree | 20a0c5ab27eb781bff288e28c37c90741aae97aa /src/common/GPIO/usart.h | |
parent | 2706d31fb899f79b1e7d95b3b3c6c7f154841173 (diff) | |
download | glutte-o-matic-d1f674cc2c05412ea9fa0de21cab777711c6331a.tar.gz glutte-o-matic-d1f674cc2c05412ea9fa0de21cab777711c6331a.tar.bz2 glutte-o-matic-d1f674cc2c05412ea9fa0de21cab777711c6331a.zip |
Add echo functionality for coulomb counter
Diffstat (limited to 'src/common/GPIO/usart.h')
-rw-r--r-- | src/common/GPIO/usart.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/common/GPIO/usart.h b/src/common/GPIO/usart.h index 681d86f..8d16b10 100644 --- a/src/common/GPIO/usart.h +++ b/src/common/GPIO/usart.h @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2016 Matthias P. Braendli, Maximilien Cuony + * Copyright (c) 2020 Matthias P. Braendli, Maximilien Cuony * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,7 +25,8 @@ /* This handles the USART 3 to the GPS receiver, and fills a queue of * NMEA messages. * - * It also handles the debug USART 2 and allows sending messages to the PC. + * It also handles the debug USART 2 to send messages to the PC and + * receiv measurements from the Glutte-batteries coulomb counter. */ #ifndef __USART_H_ @@ -41,6 +42,8 @@ #define MAX_NMEA_SENTENCE_LEN 256 +#define MAX_CCOUNTER_SENTENCE_LEN 64 + // Initialise USART2 for PC debugging void usart_init(void); @@ -74,5 +77,9 @@ void usart_gps_process_char(char); void usart_puts(USART_TypeDef*, const char*); +// Get a MAX_CCOUNTER_SENTENCE_LEN sized message from Coulomb counter +// Return 1 on success +int usart_get_ccounter_msg(char *msg); + #endif //__USART_H_ |