|
SAM4SD32 (SAM4S-EK2)
|
Serial Peripheral Interface (SPI) driver for SAM. More...
Go to the source code of this file.
Macros | |
| #define | SPI_WPMR_WPKEY_PASSWD SPI_WPMR_WPKEY((uint32_t) 0x535049) |
Functions | |
| int16_t | spi_calc_baudrate_div (const uint32_t baudrate, uint32_t mck) |
| Calculate the baudrate divider. | |
| void | spi_configure_cs_behavior (Spi *p_spi, uint32_t ul_pcs_ch, uint32_t ul_cs_behavior) |
| Configure CS behavior for SPI transfer (spi_cs_behavior_t). | |
| void | spi_disable_clock (Spi *p_spi) |
| Disable SPI clock. | |
| void | spi_enable_clock (Spi *p_spi) |
| Enable SPI clock. | |
| uint32_t | spi_get_writeprotect_status (Spi *p_spi) |
| Indicate write protect status. | |
| spi_status_t | spi_read (Spi *p_spi, uint16_t *us_data, uint8_t *p_pcs) |
| Read the received data and it's peripheral chip select value. | |
| int16_t | spi_set_baudrate_div (Spi *p_spi, uint32_t ul_pcs_ch, uint8_t uc_baudrate_divider) |
| Set Serial Clock Baud Rate divider value (SCBR). | |
| void | spi_set_bits_per_transfer (Spi *p_spi, uint32_t ul_pcs_ch, uint32_t ul_bits) |
| Set number of bits per transfer. | |
| void | spi_set_clock_phase (Spi *p_spi, uint32_t ul_pcs_ch, uint32_t ul_phase) |
| Set Data Capture Phase. | |
| void | spi_set_clock_polarity (Spi *p_spi, uint32_t ul_pcs_ch, uint32_t ul_polarity) |
| Set clock default state. | |
| void | spi_set_delay_between_chip_select (Spi *p_spi, uint32_t ul_delay) |
| Set delay between chip selects (in number of MCK clocks). | |
| void | spi_set_peripheral_chip_select_value (Spi *p_spi, uint32_t ul_value) |
| Set Peripheral Chip Select (PCS) value. | |
| void | spi_set_transfer_delay (Spi *p_spi, uint32_t ul_pcs_ch, uint8_t uc_dlybs, uint8_t uc_dlybct) |
| Configure timing for SPI transfer. | |
| void | spi_set_writeprotect (Spi *p_spi, uint32_t ul_enable) |
| Enable or disable write protection of SPI registers. | |
| spi_status_t | spi_write (Spi *p_spi, uint16_t us_data, uint8_t uc_pcs, uint8_t uc_last) |
| Write the transmitted data with specified peripheral chip select value. | |
Serial Peripheral Interface (SPI) driver for SAM.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
\cond ASF_LICENSE
Definition in file spi.c.