一、spidev_test
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/tools/spi/
spidev_test --help
spidev_test: unrecognized option `--help'
Usage: spidev_test [-DsbdlHOLC3]
-D --device device to use (default /dev/spidev1.1)
-s --speed max speed (Hz)
-d --delay delay (usec)
-b --bpw bits per word
-i --input input data from a file(e.g. "test.bin")
-o --output output data to a file(e.g. "results.bin")
-l --loop loopback
-H --cpha clock phase
-O --cpol clock polarity
-L --lsb least significant bit first
-C --cs-high chip select active high
-3 --3wire SI/SO signals shared
-v --verbose Verbose (show tx buffer)
-p Send data (e.g. "1234\xde\xad")
-N --no-cs no chip select
-R --ready slave pulls low to pause
-2 --dual dual transfer
-4 --quad quad transfer
二、spi-tools
https://github.com/cpb-/spi-tools
spi-config usage
options
-d --device=<dev> use the given spi-dev character device.
-q --query print the current configuration.
-m --mode=[0-3] use the selected spi mode.
-l --lsb={0,1} LSB first (1) or MSB first (0).
-b --bits=[7...] bits per word.
-s --speed=<int>set the speed in Hz.
-r --spirdy={0,1}set the SPI_READY spi mode flag.
-w --wait block, keeping the file descriptor open.
-h --help help screen.
-v --version display the version number.
spi-pipe usage
Options
-d --device=<dev> use the given spi-dev character device.
-m --mode=[0-3] use the selected spi mode.
-s --speed=<speed> Maximum SPI clock rate (in Hz).
-l --lsb={0,1} LSB first (1) or MSB first (0).
-B --bits=[7...] bits per word.
-r --spirdy={0,1}set the SPI_READY spi mode flag.
-b --blocksize=<int> transfer block size in byte.
-n --number=<int> number of blocks to transfer.
-h --help help screen.
-v --version display the version number.
本文转载自: https://blog.csdn.net/zqwone/article/details/127074684
版权归原作者 源码注释器 所有, 如有侵权,请联系我们删除。
版权归原作者 源码注释器 所有, 如有侵权,请联系我们删除。