Commit 3dcb9f8
furi_hal_spi: take const uint8_t* tx_buffer in trx_dma()
The DMA path only reads from tx_buffer; nothing inside writes through
the pointer. Mirrors the signature of furi_hal_spi_bus_trx() which
already takes const uint8_t* tx_buffer.
Drops the (uint8_t*) cast that furi_hal_spi_bus_tx() needed to call
furi_hal_spi_bus_trx_dma() with its own const uint8_t* buffer
parameter, and turns the (uint8_t*)&dma_dummy_u32 cast (the dummy
buffer is itself const uint32_t) into a properly const-preserving
(const uint8_t*) cast.
api_symbols.csv updated to match. Existing in-tree callers
(furi_hal_sd.c) pass non-const pointers and continue to compile
without changes; out-of-tree callers passing const pointers no
longer need to drop qualifiers.
Reported by Copilot review on #4360.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 79c1a06 commit 3dcb9f8
3 files changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1703 | 1703 | | |
1704 | 1704 | | |
1705 | 1705 | | |
1706 | | - | |
| 1706 | + | |
1707 | 1707 | | |
1708 | 1708 | | |
1709 | 1709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
0 commit comments