- Apr 03, 2020
- Feb 02, 2020
-
-
Epicardium API for max86150 aligned with latest state of sensor development on card10. Co-Authored-by:
Arist <aristkojevnikov@gmail.com>
-
schneider authored
-
schneider authored
-
- Jan 27, 2020
-
-
schneider authored
-
- Jan 24, 2020
-
-
schneider authored
-
rahix authored
leds_update_power() internally accesses the I2C bus so calls to this function need to be inside an I2C lock section. 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>
-
- Jan 20, 2020
- Jan 04, 2020
-
-
schneider authored
-
- Jan 03, 2020
-
-
rahix authored
The query-arg is not needed, remove it. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Currently, panics will silently reboot if the user doesn't happen to look at the serial console when it happens. To give a bit more feedback, display @msgctl's faultsplash and the panic messages as well. Co-authored-by:
Mateusz Zalega <mateusz@appliedsourcery.com> Signed-off-by:
Rahix <rahix@rahix.de>
-
- Dec 31, 2019
-
-
rahix authored
Originally, commit 1a3dfad3 ("fix(bhi160): Fix interrupt behavior during initialization") was supposed to fix the BHI160 axis-mapping issue (see card10/firmware#133) but apparently on some devices it still needs the original hack to work. Revert the removal of the axis-mapping hack from commit 2f56ff36 ("fix(bhi160): Call bhy_mapping_matrix_set twice for the first time"). Fixes: 1a3dfad3 ("fix(bhi160): Fix interrupt behavior during initialization") Link: https://git.card10.badge.events.ccc.de/card10/firmware/issues/133 Signed-off-by:
Rahix <rahix@rahix.de>
-
- Dec 30, 2019
-
-
Hauke Mehrtens authored
The mac Adress was printed in the wrong order, BLE stroes the MAC address in LSB first mode, different from Ethernet which uses MSB first mode. Fixes: aece2960 ("feat(ble): Add some log messages") Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de>
-
Hauke Mehrtens authored
Instead of setting these values to 0, use the same settings as used in lib/sdk/Libraries/BTLE/stack/ble-host/sources/stack/cfg/cfg_stack.c from the Cordio SDK instead of 0. In my small test these value sare not use in the normal pairing process, so I think this is not fixing any problem. Fixes: 4107bd22 ("hack(ble): Temporarily silence a warning") Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de>
-
- Dec 29, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Commit dbeec980 ("fix(pycardium): Fix delay implementation") enables the systick on core 1 but on loading a new app, it is not reset which makes some l0dables crash. Fix this by always resetting (disabling) the SysTick in the core1_reset() stub. Fixes: dbeec980 ("fix(pycardium): Fix delay implementation") Reported-by:
Beastie <fischervincent98@gmail.com> Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
The first epic_ws2812_write() call will set the first pixel to 0x008000 (bright green). This is caused by the GPIO line being pulled down on mode-setting (epic_gpio_set_pin_mode). Wait before writing the values to reset the bus and thus properly set the pixels to the correct colors on first write. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
If initialization fails, bhi160 API calls should not infinitely block waiting for it to complete; they should fail immediately with an error stating that something went wrong. Add a flag that indicates the driver to not accept API requests because initialization was not finished properly. Signed-off-by:
Rahix <rahix@rahix.de>
-
- Dec 28, 2019
-
-
rahix authored
As discussed in issue card10/firmware#133, the BHI160 changes its interrupt behavior during initialization. In commit 2f56ff36 ("fix(bhi160): Call bhy_mapping_matrix_set twice for the first time") a quick workaround for this issue was added. Replace this hack with a proper fix by reconfiguring the interrupt on the host side according to the specification. (Finally) fixes card10/firmware#133. Fixes: 2f56ff36 ("fix(bhi160): Call bhy_mapping_matrix_set twice for the first time") Link: https://git.card10.badge.events.ccc.de/card10/firmware/issues/133#note_5894 Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Port the bhi160 mutex and hwlock usage in bhi.c to the new mutex API. This will hopefully increase system stability. Signed-off-by:
Rahix <rahix@rahix.de>
-
- Dec 26, 2019
-
-
rahix authored
The call to MAX77650_getDebounceStatusnEN0() in epic_buttons_read() performs transactions on the I2C bus but is not guarded by locking the I2C hwlock. This leads to strange issues like USB mode deadlocking when writing large files. Widen the hwlock I2C section to encompass the MAX77650_getDebounceStatusnEN0() call as well. This fixes card10/firmware#189. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Port the buttons module to the new hardware lock API which can no longer fail. Signed-off-by:
Rahix <rahix@rahix.de>
-
- Dec 22, 2019
-
-
rahix authored
Using a FreeRTOS mutex directly is deprecated. Replace it with a `struct mutex`. Similarly, the deprecated `hwlock_acquire_timeout()` is replaced with `hwlock_acquire()`. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Re-add a `hwlock_acquire()` method, but this time without a timeout parameter. From a functional point of view, this is just a wrapper around `mutex_lock()`. Additionally, add `hwlock_acquire_nonblock()` which behaves like `mutex_trylock()`. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Rename hwlock_acquire() to hwlock_acquire_timeout() in preparation for future changes to the hw-lock API. Change all uses of the hw-lock API to reflect this change. This commit does not introduce any functional changes, except getting rid of the timeout usage warnings. This change is no-op, because the hwlock_acquire() implementation already replaces any non-zero timeout value with portMAX_DELAY. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
With the switch to the new mutex API, hwlock_release() cannot fail under any circumstances. To emphasize this, make it return void instead of int (Previously it just always returned 0). Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Reimplement the hw-lock module to use the new mutex API. This slightly changes the semantics of locking a hw-lock as the new mutex API does not allow timeouts. When a hwlock_acquire() with a (non-infinite) timeout is attempted, a warning is printed to the serial console. Additionally, instead of returning -EINVAL on use of a non-existent hardware lock, the new implementation triggers a firmware panic. Signed-off-by:
Rahix <rahix@rahix.de>
-
- Dec 10, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
- Dec 09, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
With the increased warning-level, GCC warns about three unused fields in `bleSmpCfg`: - maxAttemptTimeout: Maximum 'Repeated attempts' timeout in msec - attemptDecTimeout: Time msec before attemptExp decreases - attemptExp: Exponent to raise attemptTimeout on maxAttempts These should probably be set to sensible values but to make !360 mergeable, explicitly set them to zero for now. Signed-off-by:
Rahix <rahix@rahix.de>
-
- Dec 06, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
By passing `&resched` instead of just `resched`, the internal comparison in FreeRTOS would always evaluate to rescheduling. Curiously, only some GCC versions emit the -Waddress warning for this while others do not ... Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Fix sign-compare warnings for these constants. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
It does not make sense for the filesize to be given as `int`; it cannot ever be negative. Instead, use `size_t` which is unsigned. Signed-off-by:
Rahix <rahix@rahix.de>
-