- 19 Sep, 2021 15 commits
-
-
Rahix authored
Instead of duplicating the drawing code in the personal state menu, reuse the method from the parent class. This reduces code duplication but most importantly means the personal state app can benefit from fixes in the "upstream" code. Concretely, due to the changes related to ctx, this fixes visual artifacts produced by the "custom" rendering code (black areas to the right of the text).
-
Rahix authored
-
Rahix authored
Replace the gfx-based implementations of the Epicardium display API calls with ctx-based ones that try to mimick the old behavior as much as possible. In the long run, these functions are just meant for backwards compatibility while new code should interface with ctx directly (once this becomes possible). The implementations in this changeset are closely based on pippin's original Pycardium display API reimplementation. Co-developed-by:
Øyvind Kolås <pippin@gimp.org>
-
Rahix authored
Adds the most basic ctx integration, by just initializing the context and nothing more.
-
Rahix authored
-
Rahix authored
From upstream commit 35100785e2c4 ("ctx: rasterizer, micro optimizations in rasterizer_fill_rect"). The integration is mostly a copy of pippin's original integration with the biggest change being the use of a monospace default font. This font is autogenerated from lib/ctx/fira-mono.ttf at build-time so it can be easily replaced with a different one (just overwrite said file). git-url: https://ctx.graphics/.git Co-developed-by:
Øyvind Kolås <pippin@gimp.org>
-
Rahix authored
Move display initialization from hardware_early_init() into the display module to keep it closer to related functionality.
-
Rahix authored
Move the display API code into the display/ subdirectory as well.
-
Rahix authored
To not try and replace the entire gfx stack at once, start by "splicing in" the new driver for the two to work alongside each other. Primarily the new driver takes control now and we reconfigure the orientation on the fly whenever the old driver wants to update the screen.
-
Rahix authored
Currently we're still working with the reference driver from Waveshare. This driver seems hacked together and also does not really fit for what we're doing with the display. Even less so because it configures the display upside down. As a first step towards dropping this vendor library, introduce a reimplementation which is purpose built to our usecase. This new library configures the screen right side up natively but still allows to change to the legacy orientation on the fly to support the old codebase.
-
schneider authored
-
Rahix authored
-
- 17 Sep, 2021 1 commit
-
- 16 Sep, 2021 12 commits
-
-
schneider authored
-
schneider authored
-
schneider authored
-
schneider authored
The loop condition in the epic_sleep based sleep could underflow if an interrupt introduced too much delay at the end.
-
schneider authored
The clock source of epicardium is not very stable and can drift multiple percent. This has an effect on epic_sleep() and can lead to sleeps which are longer than anticipated. With this change we slowly move towards our sleep goal using multiple calls. This is less efficient but leads to precise results.
-
schneider authored
-
schneider authored
-
schneider authored
-
schneider authored
-
schneider authored
-
schneider authored
This can be used by the second core to signal that the system can go to a light sleep to recuce power consumption.
-
- 15 Sep, 2021 3 commits
- 14 Sep, 2021 1 commit
-
-
schneider authored
This reduces the power consumption of the system by around .1 mA when the personal state is not active.
-
- 17 Aug, 2021 1 commit
-
- 15 Aug, 2021 2 commits
- 25 Jul, 2021 1 commit
-
- 16 Jul, 2021 1 commit
-
-
Rahix authored
-
- 04 Jul, 2021 3 commits
-
-
Rahix authored
Disable all maskable interrupts on core 1 during API calls. This brings two main advantages: 1. It means API calls are now always ISR-safe and can be used everywhere in core 1 code. This is mostly interesting to l0dables as Pycardium should not need to do this. 2. It allows Epicardium to halt the clock for core 1 without fear as we have observed problems with doing this when core 1 is currently executing instructions that touch memory. Now a synchronous call from core 1 will guarantee that it is currently waiting in a WFE and no other ISRs could be potentially running.
-
Rahix authored
When interrupts are disabled during API calls on core 1, we can only trigger a core 1 reset when there is no API call ongoing. This means that the lifecycle machinery needs to allow any running API calls to complete before it has a chance to see its reset interrupt delivered. This is complicated because we cannot synchronize on core 1 triggering an API call - the best we can do is stop the dispatcher, check whether our reset interrupt was delivered, and if not, give it another chance to process an API call. Additionally, "give it another chance to process an API call" means that the IDLE task must run, because this is currently a prerequisite to scheduling the dispatcher (see [1]). The only way to facilitate this is with a sleep that is long enough that it will eventually let core 0 go idle. It seems that an 8 tick delay does the job quite fine. Thus, implement a busy loop which provides the above requirements and with that makes Epicardium prepared for payloads which perform API calls with interrupts disabled. [1]: https://firmware.card10.badge.events.ccc.de/epicardium/overview.html#internals
-
Rahix authored
This function is useful on its own for more complex lifecycle management in Epicardium. Split it out of core1_wait_ready() so it can be used.
-