You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/05/12 18:17:03 UTC

[GitHub] [tvm] gromero commented on a change in pull request #8021: [Fix][microTVM] QEMU RPC issue

gromero commented on a change in pull request #8021:
URL: https://github.com/apache/tvm/pull/8021#discussion_r631290613



##########
File path: apps/microtvm/zephyr/demo_runtime/src/main.c
##########
@@ -248,6 +249,9 @@ void uart_irq_cb(const struct device* dev, void* user_data) {
 
 // Used to initialize the UART receiver.
 void uart_rx_init(struct ring_buf* rbuf, const struct device* dev) {
+  const struct uart_config config = {
+      .baudrate = UART_BAUDRATE, .parity = 0, .stop_bits = 1, .data_bits = 3, .flow_ctrl = 0};

Review comment:
       @mehrdadh Hi Mehrdad. I think it would be nice to use the enums from Zephyr here (for instance .data_bits  = 3 might be a bit enigmatic for some folks):
   
   ```
      const struct uart_config config = {
   -      .baudrate = UART_BAUDRATE, .parity = 0, .stop_bits = 1, .data_bits = 3, .flow_ctrl = 0};
   +      .baudrate = UART_BAUDRATE,
   +      .parity = UART_CFG_PARITY_NONE,
   +      .stop_bits = UART_CFG_STOP_BITS_1,
   +      .data_bits = UART_CFG_DATA_BITS_8,
   +      .flow_ctrl = UART_CFG_FLOW_CTRL_NONE
   +  };
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org