]> git.earman.xyz Git - sensor-watch.git/commitdiff
deprecate debug UART
authorJoey Castillo <jose.castillo@gmail.com>
Tue, 14 Sep 2021 00:46:33 +0000 (20:46 -0400)
committerJoey Castillo <jose.castillo@gmail.com>
Tue, 14 Sep 2021 03:39:24 +0000 (23:39 -0400)
watch-library/watch/watch_uart.c
watch-library/watch/watch_uart.h

index a747e71bddea285b09dbe859960ef8242311aef3..3d97803d77e826e00f2da4d4760b9f4a72f77c70 100644 (file)
@@ -80,6 +80,9 @@ void watch_debug_putc(char c) {
     SERCOM3->USART.DATA.reg = c;
 }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 void watch_debug_puts(char *s) {
     while (*s) watch_debug_putc(*s++);
 }
+#pragma GCC diagnostic pop
index a26d60d26be17bdb326938a4b759a9a72a920d27..3c4f7aef82a673ba7a86d7d5b2b97e5047f94572 100644 (file)
 /** @addtogroup debug Debug UART
   * @brief This section covers functions related to the debug UART, available on
   *        pin D1 of the 9-pin connector.
-  * @todo Refactor this as a USB CDC so that folks can debug over USB.
-  */
+  * @warning These functions were used early on in development, before the TinyUSB
+  *          CDC was implemented. You can now print debug messages to the USB console
+  *          using printf, rendering this bit irrelevant. These methods will likely
+  *          be refactored out in the future, in favor of a more full-featured UART
+  *          on the nine-pin connector.
+  **/
 /// @{
 /** @brief Initializes the debug UART.
   * @param baud The baud rate
   */
+__attribute__((deprecated("Use printf to log debug messages over USB.")))
 void watch_enable_debug_uart(uint32_t baud);
 
 /** @brief Outputs a single character on the debug UART.
   * @param c The character you wish to output.
   */
+__attribute__((deprecated("Use printf to log debug messages over USB.")))
 void watch_debug_putc(char c);
 
 /** @brief Outputs a string on the debug UART.
   * @param s A null-terminated string.
   */
+__attribute__((deprecated("Use printf to log debug messages over USB.")))
 void watch_debug_puts(char *s);
 /// @}