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

[GitHub] [incubator-nuttx] saramonteiro opened a new pull request #3029: risc-v/esp32-c3: Adds termios support.

saramonteiro opened a new pull request #3029:
URL: https://github.com/apache/incubator-nuttx/pull/3029


   ## Summary
   This PR adds the termios support for ESP32-C3 according to NuttX support.
   
   Support status:
   
   Termios Interfaces:
   
   1. `cfgetspeed()` and `cfsetspeed()` are implemented by the OS and relies on `tcsetattr` and on `tcgetattr`.
   
   2. `cfmakeraw()` was implemented by the OS.
   
   3. `tcdrain()` - Associated IOCTLS were implementes in `serial.c`
   
   4. `tcflow()` - Pending
   Requires TCXONC ioctl to be implemented with the following actions:
   
          TCOOFF suspends output.
   
          TCOON  restarts suspended output.
   
          TCIOFF transmits a STOP character, which stops the terminal
                 device from transmitting data to the system.
   
          TCION  transmits a START character, which starts the terminal
                 device transmitting data to the system.
   No chip implements it.
   
   3. `tcflush()` - Associated IOCTLS were implementes in `serial.c`
   
   4. `tcgetattr()` - Associated IOCTLS were implemented in `esp32c3-serial.c`.
   
   5. `tcgetsid()` - Interface declared but never defined in NuttX.
   
   6. `tcsendbreak()` - Interface declared but never defined in NuttX.
   
   7. `tcsetattr()` - Associated IOCTLS were implemented in `esp32c3-serial.c`.
   
   -------------------------------------------------------------------------------------------------------------
   
   DEBUG feature: TIOCSERGSTRUCT IOCTL was implemented.
   
   ## Impact
   
   All ESP32-C3 users.
   
   ## Testing
   The tested was perfomed using the `termios` example. (This example will still be submitted to `/apps`)
   ![image](https://user-images.githubusercontent.com/33546913/110789819-0ef69380-824f-11eb-8945-5d7bdda10848.png)
   ![image](https://user-images.githubusercontent.com/33546913/110789881-2170cd00-824f-11eb-889e-228d78793ff2.png)
   
   
   
   


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] Ouss4 merged pull request #3029: risc-v/esp32-c3: Adds termios support.

Posted by GitBox <gi...@apache.org>.
Ouss4 merged pull request #3029:
URL: https://github.com/apache/incubator-nuttx/pull/3029


   


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3029: risc-v/esp32-c3: Adds termios support.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3029:
URL: https://github.com/apache/incubator-nuttx/pull/3029#discussion_r592365833



##########
File path: arch/risc-v/src/esp32c3/esp32c3_serial.c
##########
@@ -656,9 +661,208 @@ static int esp32c3_receive(struct uart_dev_s *dev, unsigned int *status)
   return (int)rx_fifo;
 }
 
+/****************************************************************************
+ * Name: esp32c3_ioctl
+ *
+ * Description:
+ *   All ioctl calls will be routed through this method.
+ *   Here it's employed to implement the TERMIOS ioctls and TIOCSERGSTRUCT.
+ *
+ * Parameters:
+ *   filep    Pointer to a file structure instance.
+ *   cmd      The ioctl command.
+ *   arg       The argument of the ioctl cmd.

Review comment:
       ```suggestion
    *   arg      The argument of the ioctl cmd.
   ```




----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] saramonteiro commented on pull request #3029: risc-v/esp32-c3: Adds termios support.

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on pull request #3029:
URL: https://github.com/apache/incubator-nuttx/pull/3029#issuecomment-797078797


   > @saramonteiro please squash the commits.
   
   Done


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3029: risc-v/esp32-c3: Adds termios support.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3029:
URL: https://github.com/apache/incubator-nuttx/pull/3029#discussion_r592365833



##########
File path: arch/risc-v/src/esp32c3/esp32c3_serial.c
##########
@@ -656,9 +661,208 @@ static int esp32c3_receive(struct uart_dev_s *dev, unsigned int *status)
   return (int)rx_fifo;
 }
 
+/****************************************************************************
+ * Name: esp32c3_ioctl
+ *
+ * Description:
+ *   All ioctl calls will be routed through this method.
+ *   Here it's employed to implement the TERMIOS ioctls and TIOCSERGSTRUCT.
+ *
+ * Parameters:
+ *   filep    Pointer to a file structure instance.
+ *   cmd      The ioctl command.
+ *   arg       The argument of the ioctl cmd.

Review comment:
       ```suggestion
    *   arg      The argument of the ioctl cmd.
   ```
   nit: alignment of the parameters description




----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] Ouss4 commented on pull request #3029: risc-v/esp32-c3: Adds termios support.

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on pull request #3029:
URL: https://github.com/apache/incubator-nuttx/pull/3029#issuecomment-797066736


   @saramonteiro please squash the commits.


----------------------------------------------------------------
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