summaryrefslogtreecommitdiff
path: root/wasp/drivers
AgeCommit message (Collapse)Author
2020-12-12boards: simulator: Improve spi.write() simulationDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-14manager: Implement alarm callbacks for applications to useDaniel Thompson
Create a simple time queue where actions (functions or bound methods) can be queued against the real time clock. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-11hrs3300: Defer initialization until the HRS is usedDaniel Thompson
This means hardware failure won't cause the initial boot to fail. This won't stop the heart rate app from crashing when it starts up but at least it will give a comprehensible crash report. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-10drivers: flash: Automatic wake/sleep to minimise idle currentDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-09-27boards: Remove flash wake up commandsJeffrey Bailey
Wake from deep power down is now handled in the driver. Remove attempt to wake the board files. Signed-off-by: Jeffrey Bailey <wb.jeffrey@gmail.com> [daniel@redfelineninja.org.uk: Update commit message, simplify slightly, extended to all boards with spinor flash and update gitmodules to bring in the flash driver updates.] Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-09-21drivers: cst816s: Clear the event buffer during a wake upDaniel Thompson
Currently with CST816S controllers (but not CST716S controllers) then a swipe delivered whilst the device is asleep will sometimes be processed after we wake it up. That's never likely to be useful. Fix this by explicitly clearing the event buffer as part of the wakeup sequence. Reported-by: Siroj42 <siroj42@users.noreply.github.com> Fixes: #65 Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-15drivers: cst816s: Handle a failure to sleepDaniel Thompson
Exceptions on th sleep path more or less kill the device (it is half alseep and is not on... but not off enough for the power button to work. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-15wasp: Introduce a NEXT eventDaniel Thompson
This is useful for devices that do not have touchscreens. It can be used to cycle through the quick ring and to check out notifications. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-09k9: Add support for Senbono K9Daniel Thompson
The K9 is similar to the PineTime and P8 devices but does not appear to use the CST[78]16 touch screen controllers. At present the protocol is not known (readfrom yields all zeros, readfrom_mem provokes an exception) so we have a hugely limited interface consisting of the side button and the touchscreen interrupts (in other words we can treat the touchscreen like a second button). Works suprisingly well considering... Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-30wasp: Switch to scheduling from interruptDaniel Thompson
This has two useful properties. Firstly it means the watch will be maintained in the background, allowing the REPL to be used for notifications and other updates. Secondly it will save a little bit of power by reducing the work needed to handle spurious wake ups. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-22drivers: hrs3300: Add a basic HRS3300 sensor driverDaniel Thompson
Add the driver and enable it on PineTime. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-12drivers: bma421: Reduce the post-reset delayDaniel Thompson
There nothing in the docs to give the delay time required after a reset. Currently we use 200ms because that appears on some older code for BMA423 but is removed in more recent drivers. 50ms is still a long time (for hardware) and has held up in testing. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-11drivers: cst816s: optimize for power saving and responsivenessFuji Pebri
Signed-off-by: Fuji Pebri <pebri86@gmail.com> [daniel@redfelineinja.org.uk: removed leading underscore from method arguments, removed redundant state tracking, adopt i2c.writeto_mem] Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-09wasp: apps: Step counter applicationDaniel Thompson
Currently there's no fancy algorithms to estimate stride length. Just pure simple step counting directly from the hardware's "intelligence engine". Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-05-14drivers: vibrator: Finalize docstringsDaniel Thompson
2020-05-14drivers: st7789: Finalize docstringsDaniel Thompson
2020-05-14drivers: signal: Finalize docstringsDaniel Thompson
2020-05-14drivers: nrf_rtc: Finalize docstringsDaniel Thompson
2020-05-14drivers: cst816s: Finalize docstringsDaniel Thompson
2020-05-14drivers: battery: Finalize docstringsDaniel Thompson
2020-05-10drivers: nrf_rtc: Fix some tab/space issuesDaniel Thompson
These issues do not appear when parsing with micropython but when we import this file into sphinx then things go a bit south.
2020-05-09Add PNVRAM support to avoid forgetting the time during a reboot.Daniel Thompson
2020-04-26wasp: drivers: nrf_rtc: Fix a nasty bug when setting the timeDaniel Thompson
The code to recalculate the uptime to walltime adjustment was broken (e.g. the longer we leave it after reboot the more inaccurate the time setting becomes). Fixes: 80079e4 ("wasp: nrf_rtc: Add a tiny bit of extra resolution")
2020-04-26wasp: nrf_rtc: Add a tiny bit of extra resolutionDaniel Thompson
We now have a couple of applications (stopwatch, Game of Life) that benefit from sub-second precision. The micropython RTC/utime code for nrf still needs a major overhaul but this allows us to paper over the cracks for just a little longer.
2020-04-08wasp: draw565: Optimize the 2-bit RLE drawing functionsDaniel Thompson
There's a bunch of different changes here but there are only really three big wins. The biggest win comes from restructuring the 2-bit RLE decode loop to avoid the inner function (~20%) but the switch to 16-bit writes in _fill() and adoption of quick_write (e.g. no CS toggling) are also note worthy (and about 5% each).
2020-04-06wasp: vibrator: Better default for pulseDaniel Thompson
These defaults are good for giving quick UI feedback.
2020-03-22Add licensing information for all wasp-os files.Daniel Thompson
2020-03-09drivers: st7789: Automatically park ready for the next call to write dataDaniel Thompson
This makes line-by-line drawing more efficient because don't have to handle the dc line. The optimization targets font rendering and if good for slightly less than 10% rendering improvement.
2020-03-09wasp: draw565: Refactor to allow apps to focus on the drawable.Daniel Thompson
2020-03-08wasp: manager: Blankt the display during app transitionsDaniel Thompson
2020-03-08drivers: cst816s: Minor tweaks to the generated documentation.Daniel Thompson
2020-03-08wasp: Integrate the touch driverDaniel Thompson
At this point we are starting to bring an event model for applications but there's still a long way to go!
2020-03-07drivers: nrf_rtc: Add a higher res monotonic timerDaniel Thompson
2020-03-07drivers: cst816s: Decouple from the watch moduleDaniel Thompson
2020-03-06wasp: cst816s: Initial PoC driverDaniel Thompson
2020-02-19wasp: Add a simple font rendererDaniel Thompson
2020-02-19wasp: Add full dd-mm-yyyy calender trackingDaniel Thompson
2020-02-09wasp: Add pure-python SPI NOR FLASH driversDaniel Thompson
2020-02-08drivers: st7789: Optimize RLE decoding loopDaniel Thompson
Migrate the filling of the line buffer into a seperate function. This does naturally reduce the cost of the loop management but much more importantly allows us to use viper native code generator.
2020-02-03wasp: st7789: Make fill() control sizingDaniel Thompson
2020-02-03wasp: st7789: Reuse the pre-allocated linebufferDaniel Thompson
2020-02-03wasp: pinetime: Basic RTC supportDaniel Thompson
Currently this supports time only (no date) and it based on the RTCounter class which is customized for nRF ports. At present the nRF port doesn't have proper machine.rtc support so we have implemented within wasp instead.
2020-02-03wasp: st7789: Add positioning support to rleblitDaniel Thompson
2020-02-01wasp: Adopt a low power mode shortly after bootingDaniel Thompson
This is useful for battery run-down testing and so on.
2020-01-31wasp: simulator: First steps towards a simulatorDaniel Thompson
Currently this just traces SPI activity from the ST7789 driver but its a good baseline to start building up test functions from.
2020-01-31wasp: Add a super-simple vibrator driverDaniel Thompson
2020-01-30wasp: Add battery supportDaniel Thompson
2020-01-28wasp: drivers: st7789: Remove redunant delayDaniel Thompson
2020-01-28wasp: drivers: st7789: native code gen for rleblitDaniel Thompson
This is a useful performance boost... but there is still scope to get this a lot quicker.
2020-01-28logo: Gather together the bitmaps into a single variableDaniel Thompson
The PineTime demo will also now cycle through both the Pine64 and MicroPython logos.