|
Plant Monitor SAM3X8E
|
HAL interface for SPI peripheral of SAM3X8E. More...
Go to the source code of this file.
Functions | |
| void | spi_init (const spi_cfg_t *cfg) |
| Initializes SPI0 peripheral of SAM3X8E. | |
| void | spi_enable () |
| Enables SPI0 peripheral of SAM3X8E. | |
| void | spi_disable () |
| Disables SPI0 peripheral of SAM3X8E. | |
| void | spi_configure (const spi_cfg_t *cfg) |
| Configures SPI0 peripheral of SAM3X8E. | |
| void | spi_transfer (const void *tx, void *rx, size_t count, const spi_bits_t bits) |
| Performs a specified amount of SPI transfers. | |
HAL interface for SPI peripheral of SAM3X8E.
Function implementations for SPI HAL of SAM3X8E.
Definition in file spi.c.
| void spi_configure | ( | const spi_cfg_t * | cfg | ) |
Configures SPI0 peripheral of SAM3X8E.
Configures SPI0 peripheral according to caller-provided configuration file.
| cfg | SPI configuration parameters. |
Definition at line 39 of file spi.c.
| void spi_disable | ( | ) |
| void spi_enable | ( | ) |
| void spi_init | ( | const spi_cfg_t * | cfg | ) |
Initializes SPI0 peripheral of SAM3X8E.
Enables peripheral clock & configures SPI0 pins.
Definition at line 13 of file spi.c.
| void spi_transfer | ( | const void * | tx, |
| void * | rx, | ||
| size_t | count, | ||
| const spi_bits_t | bits ) |
Performs a specified amount of SPI transfers.
Transmits and receives data over SPI.
| tx | Buffer containing data to be transmitted. |
| rx | Buffer containing received data. |
| count | Specifies the number of transfers to perform. |
| bits | Specifies how many bits comprise each transfer. |
Definition at line 76 of file spi.c.