-
Notifications
You must be signed in to change notification settings - Fork 164
ch32v: Add SPI HAL with DMA support #838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Lint Results
Found 7 issues on changed lines in 4 files:
- examples/wch/ch32v/src/i2c_dma.zig: 1 issue
- examples/wch/ch32v/src/spi_loopback.zig: 1 issue
- examples/wch/ch32v/src/spi_ssd1306.zig: 1 issue
- port/wch/ch32v/src/hals/spi.zig: 4 issues
ℹ️ Additional issues on unchanged lines
The following 23 issue(s) exist but are not on lines changed in this PR:
drivers/sensor/ICM-20948.zig:27: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:200: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:208: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:230: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:494: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:535: Suggestion: Rename `Accel_data_unscaled` to `AccelDataUnscaled`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:556: Suggestion: Rename `Accel_data` to `AccelData`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:599: Suggestion: Rename `Gyro_data_unscaled` to `GyroDataUnscaled`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:620: Suggestion: Rename `Gyro_data` to `GyroData`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:827: Suggestion: Rename `Mag_data_unscaled` to `MagDataUnscaled`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:868: Suggestion: Rename `Mag_data` to `MagData`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:886: Suggestion: Rename `TestI2CDevice` to `Test_I2C_Device`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/dma.zig:18: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:47: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:263: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:16: Suggestion: Rename `DmaRegs` to `DMA_Regs`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:16: Suggestion: Rename `Datagram_Device` to `DatagramDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:17: Suggestion: Rename `Stream_Device` to `StreamDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:19: Suggestion: Rename `Clock_Device` to `ClockDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:20: Suggestion: Rename `I2CError` to `I2C_Error`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:21: Suggestion: Rename `I2CAddress` to `I2C_Address`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/gpio.zig:68: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/gpio.zig:119: TODO style comments need to have a linked microzig issue on the same line.
Updating with new lint results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Lint Results
Found 6 issues on changed lines in 3 files:
- examples/wch/ch32v/src/spi_loopback.zig: 1 issue
- examples/wch/ch32v/src/spi_ssd1306.zig: 1 issue
- port/wch/ch32v/src/hals/spi.zig: 4 issues
ℹ️ Additional issues on unchanged lines
The following 23 issue(s) exist but are not on lines changed in this PR:
drivers/sensor/ICM-20948.zig:27: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:200: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:208: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:230: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:494: TODO style comments need to have a linked microzig issue on the same line.
drivers/sensor/ICM-20948.zig:535: Suggestion: Rename `Accel_data_unscaled` to `AccelDataUnscaled`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:556: Suggestion: Rename `Accel_data` to `AccelData`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:599: Suggestion: Rename `Gyro_data_unscaled` to `GyroDataUnscaled`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:620: Suggestion: Rename `Gyro_data` to `GyroData`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:827: Suggestion: Rename `Mag_data_unscaled` to `MagDataUnscaled`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:868: Suggestion: Rename `Mag_data` to `MagData`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
drivers/sensor/ICM-20948.zig:886: Suggestion: Rename `TestI2CDevice` to `Test_I2C_Device`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/dma.zig:18: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:47: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:263: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:16: Suggestion: Rename `DmaRegs` to `DMA_Regs`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:16: Suggestion: Rename `Datagram_Device` to `DatagramDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:17: Suggestion: Rename `Stream_Device` to `StreamDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:19: Suggestion: Rename `Clock_Device` to `ClockDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:20: Suggestion: Rename `I2CError` to `I2C_Error`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:21: Suggestion: Rename `I2CAddress` to `I2C_Address`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/gpio.zig:68: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/gpio.zig:119: TODO style comments need to have a linked microzig issue on the same line.
Updating with new lint results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Lint Results
Found 6 issues on changed lines in 3 files:
- examples/wch/ch32v/src/spi_loopback.zig: 1 issue
- examples/wch/ch32v/src/spi_ssd1306.zig: 1 issue
- port/wch/ch32v/src/hals/spi.zig: 4 issues
ℹ️ Additional issues on unchanged lines
The following 11 issue(s) exist but are not on lines changed in this PR:
port/wch/ch32v/src/hals/dma.zig:18: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:47: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:263: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:16: Suggestion: Rename `DmaRegs` to `DMA_Regs`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:16: Suggestion: Rename `Datagram_Device` to `DatagramDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:17: Suggestion: Rename `Stream_Device` to `StreamDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:19: Suggestion: Rename `Clock_Device` to `ClockDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:20: Suggestion: Rename `I2CError` to `I2C_Error`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:21: Suggestion: Rename `I2CAddress` to `I2C_Address`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/gpio.zig:68: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/gpio.zig:119: TODO style comments need to have a linked microzig issue on the same line.
Updating with new lint results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Lint Results
Found 3 issues on changed lines in 2 files:
- examples/wch/ch32v/src/spi_loopback.zig: 1 issue
- port/wch/ch32v/src/hals/spi.zig: 2 issues
ℹ️ Additional issues on unchanged lines
The following 11 issue(s) exist but are not on lines changed in this PR:
port/wch/ch32v/src/hals/dma.zig:18: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:47: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:263: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:16: Suggestion: Rename `DmaRegs` to `DMA_Regs`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:16: Suggestion: Rename `Datagram_Device` to `DatagramDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:17: Suggestion: Rename `Stream_Device` to `StreamDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:19: Suggestion: Rename `Clock_Device` to `ClockDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:20: Suggestion: Rename `I2CError` to `I2C_Error`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:21: Suggestion: Rename `I2CAddress` to `I2C_Address`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/gpio.zig:68: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/gpio.zig:119: TODO style comments need to have a linked microzig issue on the same line.
|
|
||
| if (total_len >= dma_cfg.threshold) { | ||
| // For vectored DMA, we need to send chunks sequentially | ||
| // TODO: Optimize with scatter-gather DMA in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO style comments need to have a linked microzig issue on the same line.
|
|
||
| if (total_len >= dma_cfg.threshold) { | ||
| // For vectored DMA, we need to read chunks sequentially | ||
| // TODO: Optimize with scatter-gather DMA in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO style comments need to have a linked microzig issue on the same line.
Updating with new lint results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Lint Results
Found 2 issues on changed lines in 1 file:
- port/wch/ch32v/src/hals/spi.zig: 2 issues
ℹ️ Additional issues on unchanged lines
The following 11 issue(s) exist but are not on lines changed in this PR:
port/wch/ch32v/src/hals/dma.zig:18: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:47: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:263: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:16: Suggestion: Rename `DmaRegs` to `DMA_Regs`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:16: Suggestion: Rename `Datagram_Device` to `DatagramDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:17: Suggestion: Rename `Stream_Device` to `StreamDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:19: Suggestion: Rename `Clock_Device` to `ClockDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:20: Suggestion: Rename `I2CError` to `I2C_Error`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:21: Suggestion: Rename `I2CAddress` to `I2C_Address`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/gpio.zig:68: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/gpio.zig:119: TODO style comments need to have a linked microzig issue on the same line.
|
|
||
| if (total_len >= dma_cfg.threshold) { | ||
| // For vectored DMA, we need to send chunks sequentially | ||
| // TODO: Optimize with scatter-gather DMA in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO style comments need to have a linked microzig issue on the same line.
|
|
||
| if (total_len >= dma_cfg.threshold) { | ||
| // For vectored DMA, we need to read chunks sequentially | ||
| // TODO: Optimize with scatter-gather DMA in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO style comments need to have a linked microzig issue on the same line.
Tested on my wch branch on top of #838
Updating with new lint results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Lint Results
Found 2 issues on changed lines in 1 file:
- port/wch/ch32v/src/hals/spi.zig: 2 issues
ℹ️ Additional issues on unchanged lines
The following 11 issue(s) exist but are not on lines changed in this PR:
port/wch/ch32v/src/hals/dma.zig:18: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:47: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:263: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:16: Suggestion: Rename `DmaRegs` to `DMA_Regs`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:16: Suggestion: Rename `Datagram_Device` to `DatagramDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:17: Suggestion: Rename `Stream_Device` to `StreamDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:19: Suggestion: Rename `Clock_Device` to `ClockDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:20: Suggestion: Rename `I2CError` to `I2C_Error`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:21: Suggestion: Rename `I2CAddress` to `I2C_Address`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/gpio.zig:68: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/gpio.zig:119: TODO style comments need to have a linked microzig issue on the same line.
|
|
||
| if (total_len >= dma_cfg.threshold) { | ||
| // For vectored DMA, we need to send chunks sequentially | ||
| // TODO: Optimize with scatter-gather DMA in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO style comments need to have a linked microzig issue on the same line.
|
|
||
| if (total_len >= dma_cfg.threshold) { | ||
| // For vectored DMA, we need to read chunks sequentially | ||
| // TODO: Optimize with scatter-gather DMA in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO style comments need to have a linked microzig issue on the same line.
Updating with new lint results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Lint Results
Found 2 issues on changed lines in 1 file:
- port/wch/ch32v/src/hals/spi.zig: 2 issues
ℹ️ Additional issues on unchanged lines
The following 9 issue(s) exist but are not on lines changed in this PR:
port/wch/ch32v/src/hals/dma.zig:18: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:47: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:263: TODO style comments need to have a linked microzig issue on the same line.
port/wch/ch32v/src/hals/dma.zig:16: Suggestion: Rename `DmaRegs` to `DMA_Regs`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:16: Suggestion: Rename `Datagram_Device` to `DatagramDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:17: Suggestion: Rename `Stream_Device` to `StreamDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:19: Suggestion: Rename `Clock_Device` to `ClockDevice`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:20: Suggestion: Rename `I2CError` to `I2C_Error`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/wch/ch32v/src/hals/drivers.zig:21: Suggestion: Rename `I2CAddress` to `I2C_Address`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
|
|
||
| if (total_len >= dma_cfg.threshold) { | ||
| // For vectored DMA, we need to send chunks sequentially | ||
| // TODO: Optimize with scatter-gather DMA in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO style comments need to have a linked microzig issue on the same line.
|
|
||
| if (total_len >= dma_cfg.threshold) { | ||
| // For vectored DMA, we need to read chunks sequentially | ||
| // TODO: Optimize with scatter-gather DMA in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO style comments need to have a linked microzig issue on the same line.
…pheral enum methods)
Updating with new lint results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Adds a complete SPI HAL implementation for CH32V (specifically CH32V203) with optional DMA support.
Key Features:
SPI_Datagram_Devicewrapper for integration with display driversDMA Integration:
Examples Included:
spi_loopback.zig - Tests all 4 SPI modes with DMA enabled, includes 32-byte pattern to trigger DMA path
spi_flash_w25q.zig - W25Q128 flash operations (JEDEC ID, erase, write, read, verify):
sharp_niceview.zig - sharp ls0xx graphic display driver integration via SPI_Datagram_Device
Implementation Notes:
inline forfor compile-time mode iteration in examplesTested On:
--release=smallbuilds🤖 This PR was AI-generated using Claude Code (claude.ai/code). Eventually I had to make my own fixes, rebases, and examples. AI probably wrote 90% by linecount.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com