SERCOM SPI master with vectored I/O driver quick start.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
Functions | |
int | main (void) |
[driver_instance] More... | |
Variables | |
uint8_t | rx_buffer_1 [1] |
uint8_t | rx_buffer_2 [2] |
struct spi_master_vec_bufdesc | rx_buffers [4] |
struct spi_master_vec_module | spi_master |
[buffer_descriptors] More... | |
uint8_t | tx_buffer_1 [3] = {1, 2, 3} |
[transceive_buffers] More... | |
uint8_t | tx_buffer_2 [2] = {4, 5} |
uint8_t | tx_buffer_3 [1] = {6} |
struct spi_master_vec_bufdesc | tx_buffers [4] |
[transceive_buffers] More... | |
int main | ( | void | ) |
[driver_instance]
[config_instance]
[config_instance]
[init_system]
[init_system]
[set_up_config_instance]
[set_up_config_instance]
[init_instance]
[init_instance]
[enable_instance]
[enable_instance]
[start_reception_wait]
[start_reception_wait]
[start_transmission]
[start_transmission]
[start_transception]
[start_transception]
[wait_transception]
[wait_transception]
References spi_master_vec_config::baudrate, spi_master_vec_config::mux_setting, NULL, spi_master_vec_config::pinmux_pad0, spi_master_vec_config::pinmux_pad1, spi_master_vec_config::pinmux_pad2, spi_master_vec_config::pinmux_pad3, spi_master, spi_master_vec_enable(), spi_master_vec_get_config_defaults(), spi_master_vec_get_job_status_wait(), spi_master_vec_init(), spi_master_vec_transceive_buffer_job(), spi_master_vec_transceive_buffer_wait(), SPI_TRANSFER_MODE_3, STATUS_BUSY, system_init(), and spi_master_vec_config::transfer_mode.
uint8_t rx_buffer_1[1] |
uint8_t rx_buffer_2[2] |
struct spi_master_vec_bufdesc rx_buffers[4] |
struct spi_master_vec_module spi_master |
uint8_t tx_buffer_1[3] = {1, 2, 3} |
[transceive_buffers]
uint8_t tx_buffer_2[2] = {4, 5} |
uint8_t tx_buffer_3[1] = {6} |
struct spi_master_vec_bufdesc tx_buffers[4] |
[transceive_buffers]
[buffer_descriptors]