- Dec 06, 2019
-
-
rahix authored
Make the length parameter a `size_t` instead of a `intptr_t`. A signed value does not make any sense here and just leads to weird behavior if a negative value is given nonetheless. See issue card10/firmware#192 Signed-off-by:
Rahix <rahix@rahix.de>
-
- Oct 05, 2019
-
-
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 <rahix@rahix.de>
-
- Sep 15, 2019
-
-
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:
Rahix <rahix@rahix.de>
-
- Aug 24, 2019
-
-
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 <rahix@rahix.de> Signed-off-by:
danukeru <danukeru@foulab.org>
-
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.
-
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:
Rahix <rahix@rahix.de>
-
- Aug 15, 2019
-
-
rahix authored
Closes #67 Signed-off-by:
Rahix <rahix@rahix.de>
-
- Aug 06, 2019
-
- Aug 03, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
- Jul 21, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
- Jul 20, 2019
-
-
schneider authored
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
- Jul 11, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
- Jul 06, 2019
-
- Jul 05, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
- Jul 04, 2019
-
- Jul 03, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-