Commit Graph

20 Commits

Author SHA1 Message Date
true 6b84019e0b fixed button handler not reporting buttons correctly 2024-10-25 18:40:55 -07:00
true 56cd06876a fix systick, i2c interrupt handlers not defined as interrupt 2024-10-25 17:28:56 -07:00
true 8d82d83568 fix i2c clock stretching, bit timings; speed up i2c; accelerometer working; many other fixes
fixed i2c routine usage throughout the code.
clock speed increased as rendering was taking too long.
fixed aw20xxx LED enable code (I think).
now handling buttons, though still having some problems.
running even more code from RAM.
using less EEPROM for config as we don't need it. hell we don't even need the pages we have.
2024-10-25 17:27:46 -07:00
true 64ce976b97 i2c master seems to be working
OLED is now rendering "Supercon" text.

Moved several functions to RAM to speed up operation. There is a significant speed hit when executing from Flash on this MCU.
2024-10-24 19:36:11 -07:00
true 261f5bdfbf ignore accelerometer if it isn't found 2024-10-24 17:23:51 -07:00
true bc300e522a main program tick interrupt now works
CH58x/CH59x only has one main system clock and all timers are referenced to this clock. Other than watchdog, there's only one timer that runs independently: RTC. Thankfully the RTC has a mode to interrupt at rates faster than one second. this is being used for the program tick interrupt.

Also added OLED initialization code since that was forgotten before.
2024-10-24 17:22:20 -07:00
true 58f357334a add missing MRS project files 2024-10-20 02:10:55 -07:00
true 16ffde1077 soft i2c work
added a check to soft i2c master for clock stretch on write.

mostly implemented soft i2c slave.
2024-10-19 19:14:33 -07:00
true 904fcf65b4 i2c master cleanup; work in progress for i2c slave support 2024-10-17 21:09:34 -07:00
true 9159a37dd2 V003: slave registers for buttons updated 2024-10-17 21:06:29 -07:00
true db44d3dbab get oled, menus, rgbled, and most everything else building
will it work? almost certainly not. but it does build cleanly now.

lightsense is stubbed for the time being.

rgbled does _not_ render the programs. I am going to redo how this works. the data (which will be empty) is sent though.
2024-10-16 00:10:05 -07:00
true 9afb5e6ecd fix issue with AW20054 support
the module originally made assumptions about devices always using every row, even though code was in place to sort of look for that. Hopefully fixed those bugs so AW20054, which only has 9 rows, or any other chip when using less than 12 rows will work.
2024-10-16 00:07:58 -07:00
true 8a5e11592c add vendor accelerometer library
vendor accelerometer library is added, and initial code to use it has also been adapted from an example. this is incomplete; need to implement interrupts if using them. for now this may be just enough to work in polled mode.
2024-10-15 04:24:45 -07:00
true caaa30d67e more menu fixups 2024-10-15 04:23:17 -07:00
true d33cc2f775 add eeprom support, user config loading 2024-10-15 04:23:00 -07:00
true 6a4284176b initial import and cleanup of WP DC29 nametag code
many things are different from WP DC29, including but not limited to:
- different vendor and core
- different peripherals
- no external serial number MCU, now have different i2c-communicated MCU
- different accelerometer
- different RGBLED count
- RGBLED controller instead of PWM controller
- soft I2C instead of hard I2C
- I2C EEPROM instead of SPI Flash

code has been "cleaned up" and some work done for porting. the code "builds" but most of the render code isn't actually used yet. there's still a lot to fix between render, UI, and incomplete implementations.
2024-10-13 20:12:28 -07:00
true 2b31b1b6b3 ch592 cleanup 2024-10-13 03:02:27 -07:00
true b1bca1012f initial soft i2c routines written; AW20xxx code copied in
completely untested. i2c delay cycles are at best a guess.
2024-10-13 02:53:18 -07:00
true b6582a599a Englishify some of the CH592 StdPeriphDriver 2024-10-12 22:53:04 -07:00
true 576026f771 initial commit of work in progress code
The V003 sub MCU code is mostly initially written, though needs to be tested and fixed.
2024-10-12 21:59:33 -07:00