同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Related Modules:
Description:
Defines standard SPI-specific interfaces for driver development.
A driver needs to use the SPI-specific interfaces for data writing and reading before performing any operations on an SPI-compliant device.
Since:
1.0
Defines the general SPI device descriptor, which can be used as the unique identifier of an SPI device. When operating an SPI device, you need to specify a descriptor of the SpiDevInfo type, and obtain the handle of the SPI device by calling SpiOpen. |
|
SPI_CLK_PHASE (1 << 0) |
Indicates the SPI clock phase. The value 0 indicates that data will be sampled on the first clock edge, and 1 indicates that data will be sampled on the second clock edge. |
SPI_CLK_POLARITY (1 << 1) |
Indicates the SPI clock polarity. The value 0 indicates a low-level clock signal in the idle state, and 1 indicates a high-level clock signal in the idle state. |
SPI_MODE_3WIRE (1 << 2) |
Indicates that a single data line is used for both input and output. |
SPI_MODE_LOOP (1 << 3) |
|
SPI_MODE_LSBFE (1 << 4) |
Indicates the SPI data transfer order. The value 0 indicates that data is transferred from the most significant bit (MSB) to the least significant bit (LSB), and 1 indicates the opposite. |
SPI_MODE_NOCS (1 << 5) |
Indicates that there is only one SPI device, and no chip select (CS) is required. |
SPI_MODE_CS_HIGH (1 << 6) |
Indicates that the CS level is high when an SPI device is selected. |
SPI_MODE_READY (1 << 7) |
Indicates that the SPI device is set to low for pausing data transfer. |
SpiTransferMode { SPI_INTERRUPT_TRANSFER = 0, SPI_POLLING_TRANSFER, SPI_DMA_TRANSFER } |
SpiOpen (const struct SpiDevInfo *info) |
struct DevHandle * |
SpiTransfer (struct DevHandle *handle, struct SpiMsg *msgs, uint32_t count) |
|
SpiRead (struct DevHandle *handle, uint8_t *buf, uint32_t len) |
|
SpiWrite (struct DevHandle *handle, uint8_t *buf, uint32_t len) |
|
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。