Commit dac493f
SPI: Fix discarded-qalifiers warning when compiling with all warnings (#3458)
* SPI: Fix discarded-qalifiers warning when compiling with all warnings
This fixes an error introduced with changeset b847f41 which
tightened the use of const for read-only data. The helper
funtion __transferBytes also requires the const qualifier on
outgoing data. Without this change a warning is displayed
when compiling with the Arduino IDE set to display "All"
compiler warnings.
Tests:
- Build an ESP32 SPI sketch that uses static const data to send
to an SPI device using the SPI.transferBytes() API
* SPI:Ensure all local functions are marked static
This audits all functions in the esp32-hal-xpi.c module and
ensures that any functions entirely local to the module are
marked as static.
Tests:
- Build with Arduino set to show all warnings and ensure none
are displayed
* SPI: Remove unused local __spiTranslate24 function
This removes the __spiTranslate24() function which is unused.1 parent bc3d113 commit dac493f
1 file changed
+2
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
| 535 | + | |
546 | 536 | | |
547 | 537 | | |
548 | 538 | | |
| |||
630 | 620 | | |
631 | 621 | | |
632 | 622 | | |
633 | | - | |
| 623 | + | |
634 | 624 | | |
635 | 625 | | |
636 | 626 | | |
| |||
0 commit comments