Microchip® Advanced Software Framework

qs_spi_slave_basic.c File Reference

SAM SPI Quick Start.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>

Macros

#define BUF_LENGTH   20
 [setup] [buf_length] More...
 

Functions

void configure_spi_slave (void)
 [dev_inst] [setup] More...
 
int main (void)
 [configure_spi] More...
 

Variables

static uint8_t buffer_expect [BUF_LENGTH]
 [buf_length] More...
 
static uint8_t buffer_rx [BUF_LENGTH] = {0x00}
 
struct spi_module spi_slave_instance
 [buffer] More...
 

#define BUF_LENGTH   20

[setup] [buf_length]

Referenced by main().

void configure_spi_slave ( void  )

[dev_inst] [setup]

[configure_spi]

[config]

[config]

[conf_defaults]

[conf_defaults] [conf_spi_slave_instance]

[conf_spi_slave_instance] [conf_preload]

[conf_preload] [conf_format]

[conf_format] [mux_setting]

[mux_setting]

[init]

[init]

[enable]

[enable]

int main ( void  )

[configure_spi]

[main_start]

[system_init]

[system_init]

[run_config]

[run_config] [main_start]

[main_use_case] [read]

[read] [compare]

[compare] [inf_loop]

[inf_loop] [main_use_case]

References BUF_LENGTH, buffer_expect, buffer_rx, configure_spi_slave(), delay, i, port_pin_toggle_output_level(), result, spi_read_buffer_wait(), spi_slave_instance, STATUS_OK, and system_init().

uint8_t buffer_expect[BUF_LENGTH]
static
Initial value:
= {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13
}

[buf_length]

[buffer]

Referenced by main().

uint8_t buffer_rx[BUF_LENGTH] = {0x00}
static

Referenced by main().

struct spi_module spi_slave_instance

[buffer]

[dev_inst]