/**
* spi_bitbang_start - start up a polled/bitbanging SPI master driver
* @bitbang: driver handle
*
* Caller should have zero-initialized all parts of the structure, and then
* provided callbacks for chip selection and I/O loops. If the master has
* a transfer method, its final step should call spi_bitbang_transfer; or,
* that's the default if the transfer routine is not initialized. It should
* also set up the bus number and number of chipselects.
*
* For i/o loops, provide callbacks either per-word (for bitbanging, or for
* hardware that basically exposes a shift register) or per-spi_transfer
* (which takes better advantage of hardware like fifos or DMA engines).
*
* Drivers using per-word I/O loops should use (or call) spi_bitbang_setup,
* spi_bitbang_cleanup and spi_bitbang_setup_transfer to handle those spi
* master methods. Those methods are the defaults if the bitbang->txrx_bufs
* routine isn't initialized.
*
spi_bitbang_start
最新推荐文章于 2022-09-16 15:56:32 发布
本文详细介绍了如何配置SPI主设备的 spi_master 结构体,包括mode_bits、transfer、setup和cleanup等字段,并且讲解了spi_bitbang结构体的设置过程。最后,通过spi_register_master函数将SPI主设备注册到系统中。
摘要由CSDN通过智能技术生成