1. 06 Dec, 2019 2 commits
  2. 05 Oct, 2019 1 commit
    • Rahix's avatar
      feat(serial): Add function to switch serial to synchronous · 5e25bc89
      Rahix authored
      In severe error conditions, asynchronous prints will never work.  For
      such cases we need a way to make prints happen synchronously again, the
      same way it works during early boot.  Add a serial_return_to_synchronous()
      function which unconditionally switches the serial driver code to
      synchronous mode.
      Only use this function in unrecoverable error conditions!
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
  3. 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>
  4. 24 Aug, 2019 3 commits
    • danukeru's avatar
      feat(serial): Funnel writes through a stream-buffer · 48a84389
      danukeru authored
      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
      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>
  5. 15 Aug, 2019 1 commit
  6. 06 Aug, 2019 1 commit
  7. 03 Aug, 2019 3 commits
  8. 21 Jul, 2019 1 commit
  9. 20 Jul, 2019 2 commits
  10. 11 Jul, 2019 1 commit
  11. 06 Jul, 2019 1 commit
  12. 05 Jul, 2019 1 commit
  13. 04 Jul, 2019 2 commits
  14. 03 Jul, 2019 2 commits