Microchip® Advanced Software Framework

qs_spi_master_vec_basic.c File Reference

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]
Initial value:
= {
{
.data = rx_buffer_1,
.length = 1,
},
{
.data = NULL,
.length = 2,
},
{
.data = rx_buffer_2,
.length = 2,
},
{
.data = NULL,
.length = 0,
},
}
uint8_t rx_buffer_1[1]
Definition: qs_spi_master_vec_basic.c:44
uint8_t rx_buffer_2[2]
Definition: qs_spi_master_vec_basic.c:45
#define NULL
Definition: nm_bsp.h:64
struct spi_master_vec_module spi_master

[buffer_descriptors]

[driver_instance]

Referenced by main().

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]
Initial value:
= {
{
.data = tx_buffer_1,
.length = 3,
},
{
.data = tx_buffer_2,
.length = 2,
},
{
.data = tx_buffer_3,
.length = 1,
},
{
.data = NULL,
.length = 0,
},
}
uint8_t tx_buffer_3[1]
Definition: qs_spi_master_vec_basic.c:42
uint8_t tx_buffer_1[3]
[transceive_buffers]
Definition: qs_spi_master_vec_basic.c:40
uint8_t tx_buffer_2[2]
Definition: qs_spi_master_vec_basic.c:41
#define NULL
Definition: nm_bsp.h:64

[transceive_buffers]

[buffer_descriptors]