Commit Graph

12 Commits

Author SHA1 Message Date
j1nx 4cb0856e6f [All] The big version jump one again 2024-04-11 07:47:59 +00:00
j1nx 783900f225 [RPI] Use vocalfusion 6.6 kernel using new GPIO APIv2 2024-02-17 19:35:47 +00:00
j1nx 2a361ae00c [RPI4] Bump experimental VocalFusion test driver 2024-02-17 09:55:42 +00:00
j1nx 9dab4692a4 [WIP] Switch to vocalfusion PR driver for test drives 2024-02-11 11:47:38 +00:00
Bohdan Buinich c0442cc0e6 [RPI] Refactor SPI and GPIO handling for XVF3510 initialization
This commit significantly overhauls the script for setting the XVF3510 board to boot from SPI slave mode and for loading a binary file. The refactor not only aims at improving code readability, maintainability, and robustness but also addresses compatibility issues with the latest Raspberry Pi models, specifically the Raspberry Pi 5, which does not support the RPi.GPIO library.

Changes made:
- Switched from `smbus` to `smbus2` for I2C communication, offering a more modern and robust interface.
- Replaced `RPi.GPIO` and `spidev` with `digitalio` and `busio` from the `adafruit_blinka` library, enhancing cross-platform compatibility and providing a more Pythonic API for GPIO and SPI operations.
- Introduced type annotations for function signatures, improving code readability and type safety.
- Added exception handling around I2C operations and file reading, increasing the script's robustness by gracefully handling potential errors.
- Defined global variables for GPIO pin configurations, making the code cleaner and easier to modify for different setups.
- Encapsulated GPIO setup and reset logic into dedicated functions (`setup_direct_gpio`), streamlining the main logic flow and separating concerns.
- Modularized SPI setup (`setup_spi`) and data transmission logic (`send_data_over_spi` and `handle_block_transfer`), enhancing code organization and maintainability.

Benefits:
- The use of `smbus2` and `adafruit_blinka` libraries modernizes the script and may improve compatibility with a wider range of devices and future Python versions.
- Type annotations and structured exception handling make the script more understandable and safer to execute, reducing the risk of runtime errors.
- The refactoring into more granular functions and the introduction of global variables for configuration parameters make the script easier to read, modify, and extend.
- Improved error handling ensures that the script fails gracefully, providing clear error messages and avoiding potential resource leaks.
2024-02-08 01:25:53 +02:00
j1nx 379e94dad3 [RPI] (WIP) Switch to kernel 6.6 VocalFusion drivers 2024-02-07 22:19:43 +00:00
j1nx 7dd52b67bd [RPI] Bump VocalFusion SJ-201 drivers 2023-12-11 07:51:51 +00:00
j1nx e84818f62e Get buildroot-external tree to reflect 2022.02.1
- Changes to the raspberypi board folder/structure
- Bump python related poackages and fixes to Python3.10
- Bump KF5 framewerk packages to 5.91
- Bump qtwebengine to 5.15.8
- Bump/Add/Fix all OVOS related packages
- Fixes all over the OpenVoiceOS structure for 2022.02.1
2022-05-12 10:46:41 +02:00
j1nx 812e92cbde Get the sj201 in line / Sound system architecture changes 2021-09-04 15:42:24 +02:00
j1nx 4bd41cf6a8 Bump vocalfusion driver again 2021-09-04 13:48:10 +02:00
j1nx 6dc30b775a Bump vocalfusion driver (this will going to happen a lot) 2021-09-03 22:31:23 +02:00
j1nx 45ed401e37 Initial package for the vocalfusion driver 2021-09-02 22:17:22 +02:00