Microchip® Advanced Software Framework

spi_master_vec.c File Reference

SERCOM SPI master with vectored I/O driver implementation.

Copyright (c) 2013-2020 Microchip Technology Inc. and its subsidiaries.

#include "spi_master_vec.h"
#include <sercom_interrupt.h>
#include <system.h>
#include <system_interrupt.h>

Functions

static void _spi_master_vec_int_handler (uint8_t sercom_index)
 Interrupt handler. More...
 
void spi_master_vec_disable (struct spi_master_vec_module *const module)
 Disable the SERCOM SPI module. More...
 
void spi_master_vec_enable (const struct spi_master_vec_module *const module)
 Enable the SERCOM SPI module. More...
 
enum status_code spi_master_vec_init (struct spi_master_vec_module *const module, Sercom *const sercom, const struct spi_master_vec_config *const config)
 Initialize hardware and driver instance. More...
 
void spi_master_vec_reset (struct spi_master_vec_module *const module)
 Reset the SERCOM SPI module. More...
 
enum status_code spi_master_vec_transceive_buffer_job (struct spi_master_vec_module *const module, struct spi_master_vec_bufdesc tx_bufdescs[], struct spi_master_vec_bufdesc rx_bufdescs[])
 Start vectored I/O transfer. More...
 

static void _spi_master_vec_int_handler ( uint8_t  sercom_index)
static

Interrupt handler.

Parameters
[in]sercom_indexSERCOM instance number passed from the master SERCOM driver.

References _sercom_instances, Assert, length, NULL, SPI_MASTER_VEC_DIRECTION_BOTH, SPI_MASTER_VEC_DIRECTION_IDLE, SPI_MASTER_VEC_DIRECTION_READ, SPI_MASTER_VEC_DIRECTION_WRITE, STATUS_OK, and UNUSED.

Referenced by spi_master_vec_init().