- 论坛徽章:
- 17
|
本帖最后由 asuka2001 于 2011-06-28 15:49 编辑
include/linux/spi/spi.h中的注释说的很清楚,我偷懒直接摘抄了其中一段,如果希望了解的更清楚,可以去看spi_transfer的注释!
* All SPI transfers start with the relevant chipselect active. Normally
* it stays selected until after the last transfer in a message. Drivers
* can affect the chipselect signal using cs_change.
*
* (i) If the transfer isn't the last one in the message, this flag is
* used to make the chipselect briefly go inactive in the middle of the
* message. Toggling chipselect in this way may be needed to terminate
* a chip command, letting a single spi_message perform all of group of
* chip transactions together.
*
* (ii) When the transfer is the last one in the message, the chip may
* stay selected until the next transfer. On multi-device SPI busses
* with nothing blocking messages going to other devices, this is just
* a performance hint; starting a message to another device deselects
* this one. But in other cases, this can be used to ensure correctness.
* Some devices need protocol transactions to be built from a series of
* spi_message submissions, where the content of one message is determined
* by the results of previous messages and where the whole transaction
* ends when the chipselect goes intactive.
笼统点说,cs_change其实是指示在bit流传输完毕后是否将片选设置为无效 |
|