Skip to content
Snippets Groups Projects
  1. Dec 06, 2019
  2. Oct 05, 2019
    • 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: default avatarRahix <rahix@rahix.de>
      5e25bc89
  3. Sep 15, 2019
    • rahix's avatar
      feat(serial): Add serial_flush function · 86c8339e
      rahix authored
      
      serial_flush() allows flushing the serial buffer from anywhere in
      Epicardium.
      
      - 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
        rescheduled.
      - 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: default avatarRahix <rahix@rahix.de>
      Verified
      86c8339e
  4. Aug 24, 2019
    • 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: default avatarRahix <rahix@rahix.de>
      Signed-off-by: default avatardanukeru <danukeru@foulab.org>
      Verified
      48a84389
    • swym's avatar
      feat(epicardium): Add ESB module · 9b0fd54f
      swym authored and rahix's avatar rahix committed
      usb/epc_usb
      ====
      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.
      
      modules/usb
      ====
      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
      it.
      9b0fd54f
    • 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
      interleave.
      
      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: default avatarRahix <rahix@rahix.de>
      Verified
      32681478
  5. Aug 15, 2019
  6. Aug 06, 2019
  7. Aug 03, 2019
  8. Jul 21, 2019
  9. Jul 20, 2019
  10. Jul 11, 2019
  11. Jul 06, 2019
  12. Jul 05, 2019
  13. Jul 04, 2019
  14. Jul 03, 2019
Loading