spi_set_format() docs should explain expected cpol and cpha values #213
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk#213
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The docs for spi_set_format() don't explain what values we should give for cpol and cpha, meaning that we have have to examine the source code to find acceptable values.
spi_cpha_t takes either SPI_CPHA_0 or SPI_CPHA_1 (you can't just specify 0 or 1).
Similarly, spi_cpol_t takes either SPI_CPOL_0 or SPI_CPOL_1.
Please annotate the SDK accordingly.
https://en.wikipedia.org/wiki/Serial_Peripheral_Interface#Clock_polarity_and_phase ?
You've missed my point. My point is that you can't just supply the values 0 or 1 for arguments, you have to supply SPI_CPHA_0, SPI_CPHA_1, etc.. The only way I found that out was by looking at the header file. I shouldn't need to examine source files to determine what the acceptable values are, it should be in the docs.
Right, I misunderstood what you were asking, sorry.
Ahhhh, so I guess what you actually need is for the enums used at https://raspberrypi.github.io/pico-sdk-doxygen/group__hardware__spi.html#ga40250e8645b672418cd8d549d0b705d1 to appear in the doxygen output. Yeah, that should be fairly easy to add, thanks for pointing out the omission. 👍
Yeah, that's what I'm saying.
Thanks, fixed by #216
Please let us know if you spot any others we've forgotten to add to the Doxygen!
This can be closed now, #216 was merged.