1. 15 Sep, 2019 1 commit
    • Rahix's avatar
      feat(serial): Add serial_flush function · 86c8339e
      Rahix authored
      serial_flush() allows flushing the serial buffer from anywhere in
      - When run from thread mode it will flush to UART, CDC-ACM and BLE.
        This is similar to what the serial task would do once it is
      - When run inside an exception handler, it will only flush to UART
        because CDC-ACM and BLE cannot be flushed from an ISR.  Note that
        characters flushed this way will never appear on the other outputs,
        even if the serial task is scheduled at some point afterwards.
      The main use of this function is to ensure output of messages even in
      cases of critical failures.
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
  2. 24 Aug, 2019 3 commits
    • danukeru's avatar
      feat(serial): Funnel writes through a stream-buffer · 48a84389
      danukeru authored and Rahix's avatar Rahix committed
      Previously, race-conditions between multiple serial writes could lead to
      memory corruption and weird artifacts like I2C getting stuck.  This
      patch introduces a write-streambuffer which queues all messages.
      Co-authored-by: Rahix's avatarRahix <rahix@rahix.de>
      Signed-off-by: default avatardanukeru <danukeru@foulab.org>
    • swym's avatar
      feat(epicardium): Add ESB module · 9b0fd54f
      swym authored and Rahix's avatar Rahix committed
      Contains device-independent USB implementation, services MAXUSB stack
      and is given the actual USB descriptors & callbacks on initialization.
      Handles USB events and configures/deconfigures the device accordingly
      during the USB setup procedure.
      usb/mass_storage & cdcacm
      Contain device-specific implementations, service MAXUSB's device class
      APIs for cdcacm and mass storage.
      Here, mass storage is independent of the underlying storage device.
      Public apic_usb API, configuration and storage device management.
      Defines the actual USB device descriptors and services the upc_usb API.
      If we want to add SD card functionality, this would be the place to add
    • Rahix's avatar
      fix(serial): Perform serial prints in a critical section · 32681478
      Rahix authored
      Sometimes during initialization, one `log_msg()` intercepts another one,
      leading to a whole lot of weird issues in other modules (like I2C).  I
      suspect this to be memory corruption of some kind.  The issues can be
      fixed by performing serial prints in a critical section, thus ensuring
      atomicity of prints.  Note that this does not mean log messages will not
      The CDC-ACM and BLE-Serial writes cannot be put into a critical section
      and are thus a point where this code can still fail.  For now, however,
      this fix ensures the race-conditions during startup, where USB and BLE
      are not yet running, don't happen anymore.
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
  3. 15 Aug, 2019 1 commit
  4. 06 Aug, 2019 1 commit
  5. 03 Aug, 2019 3 commits
  6. 21 Jul, 2019 1 commit
  7. 20 Jul, 2019 2 commits
  8. 11 Jul, 2019 1 commit
  9. 06 Jul, 2019 1 commit
  10. 05 Jul, 2019 1 commit
  11. 04 Jul, 2019 2 commits
  12. 03 Jul, 2019 2 commits