Skip to content
Snippets Groups Projects
  1. Jul 31, 2023
  2. Jul 28, 2023
  3. Jul 27, 2023
  4. Jul 23, 2023
  5. Jul 20, 2023
  6. Jul 18, 2023
  7. Jul 02, 2023
  8. Jul 01, 2023
  9. Jun 30, 2023
  10. Jun 28, 2023
  11. Jun 21, 2023
  12. Jun 16, 2023
  13. Jun 14, 2023
  14. Jun 13, 2023
  15. Jun 10, 2023
    • Emilio Corigliano's avatar
      [USART] Improved USART driver · 6370560d
      Emilio Corigliano authored
      - Checked and fixed the baudrate calculation and used `getAPBPeripheralsClock`;
      - Removed init method: Some checks are present only as asserts, but the most part of the initialization is performed in the constructor. This usually won't be an issue till we don't try to create a non supported USART (an assert is used to check for this). Removing the init method we delete the issue on forgetting to initialize the bus;
      - Changed interface for read: USART and STM32SerialWrapper have `readBlocking` (waits for at least one byte to be received) while only USART has the non-blocking `read` method that returns true if the driver received something and false otherwise; Also, both methods are overloaded to support or not the return of the number of bytes read;
      - Removed pins from the `USART.h` file;
      - Avoided internally initializing pins in the STM32SerialWrapper driver. We will always have to initialize them externally;
      - Enhanced the ifdefs present in the driver to address peripherals and not targets;
      - Now baudrate is passed as an integer, so the driver is not limited to the standard baudrates. Anyway the list of default baudrate values is present in the documentation;
      - Removed all the other wrappers of the miosix serial driver so that all the codebase uses the USART driver;
      - Enhanced documentation;
      - Small code refactoring
      - Enhanced ISR code
      6370560d
Loading