]> git.earman.xyz Git - sensor-watch.git/commitdiff
use char instead of uint8_t to match gossamer API
authorjoeycastillo <joeycastillo@utexas.edu>
Sun, 27 Oct 2024 18:27:55 +0000 (14:27 -0400)
committerjoeycastillo <joeycastillo@utexas.edu>
Sun, 27 Oct 2024 18:27:55 +0000 (14:27 -0400)
watch-faces/demo/irda_demo_face.c
watch-library/hardware/watch/watch_uart.c
watch-library/shared/watch/watch_uart.h
watch-library/simulator/watch/watch_uart.c

index 86dd845ed6ca6fa2658b859ff1a5859fa8a57b7d..3b22e4a1e699d1a0baaa357021c1cd27eb93ff70 100644 (file)
@@ -63,7 +63,7 @@ bool irda_demo_face_loop(movement_event_t event, void *context) {
         case EVENT_ACTIVATE:
         case EVENT_TICK:
         {
-            uint8_t data[32];
+            char data[32];
             size_t bytes_read = uart_read_instance(0, data, 32);
             if (bytes_read) {
                 char buf[14];
index a1518b99a4679053010d41331a9571619d94ed48..15f305a03604d59e2ede1214ee170dc55736a39d 100644 (file)
@@ -61,11 +61,11 @@ void watch_enable_uart(const uint16_t tx_pin, const uint16_t rx_pin, uint32_t ba
     uart_enable_instance(3);
 }
 
-void watch_uart_puts(uint8_t *s) {
+void watch_uart_puts(char *s) {
     uart_write_instance(3, s, strlen((const char *)s));
 }
 
-size_t watch_uart_gets(uint8_t *data, size_t max_length) {
+size_t watch_uart_gets(char *data, size_t max_length) {
     return uart_read_instance(3, data, max_length);
 }
 
index bcbcd4dbdabf335ae7a84b6df32bd5f9e2b100fb..5dbc5007dbed772b735d7da071703122bdf8dec3 100644 (file)
@@ -45,14 +45,14 @@ void watch_enable_uart(const uint16_t tx_pin, const uint16_t rx_pin, uint32_t ba
 /** @brief Transmits a string of bytes on the UART's TX pin.
   * @param s A null-terminated string containing the bytes you wish to transmit.
   */
-void watch_uart_puts(uint8_t *s);
+void watch_uart_puts(char *s);
 
 /** @brief Returns a string of bytes received on the UART's RX pin.
   * @param data A pointer to a buffer where the received bytes will be stored.
   * @param max_length The maximum number of bytes to receive.
   * @return The number of bytes actually received into the buffer.
   */
-size_t watch_uart_gets(uint8_t *data, size_t max_length);
+size_t watch_uart_gets(char *data, size_t max_length);
 
 /// @}
 #endif
index f523cce2ac8b0e543dab61201170eb25443fe62c..eafbdfbd85eb4ef147c11e70de12a91707ce2f73 100644 (file)
@@ -32,13 +32,13 @@ void watch_enable_uart(const uint16_t tx_pin, const uint16_t rx_pin, uint32_t ba
     rx_enable = !!rx_pin;
 }
 
-void watch_uart_puts(uint8_t *s) {
+void watch_uart_puts(char *s) {
        if (tx_enable) {
         // TODO: hook up to UI
     }
 }
 
-size_t watch_uart_gets(uint8_t *data, size_t max_length) {
+size_t watch_uart_gets(char *data, size_t max_length) {
        if (rx_enable) {
         // TODO: hook up to UI
     }