Microchip® Advanced Software Framework

spi_interrupt.h File Reference

SAM Serial Peripheral Interface Driver (Callback Mode)

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

#include "spi.h"

Functions

Callback Management
void spi_register_callback (struct spi_module *const module, spi_callback_t callback_func, enum spi_callback callback_type)
 Registers a SPI callback function. More...
 
void spi_unregister_callback (struct spi_module *module, enum spi_callback callback_type)
 Unregisters a SPI callback function. More...
 
static void spi_enable_callback (struct spi_module *const module, enum spi_callback callback_type)
 Enables an SPI callback of a given type. More...
 
static void spi_disable_callback (struct spi_module *const module, enum spi_callback callback_type)
 Disables callback. More...
 
Writing and Reading
enum status_code spi_write_buffer_job (struct spi_module *const module, uint8_t *tx_data, uint16_t length)
 Asynchronous buffer write. More...
 
enum status_code spi_read_buffer_job (struct spi_module *const module, uint8_t *rx_data, uint16_t length, uint16_t dummy)
 Asynchronous buffer read. More...
 
enum status_code spi_transceive_buffer_job (struct spi_module *const module, uint8_t *tx_data, uint8_t *rx_data, uint16_t length)
 Asynchronous buffer write and read. More...
 
void spi_abort_job (struct spi_module *const module)
 Aborts an ongoing job. More...
 
static enum status_code spi_get_job_status (const struct spi_module *const module)
 Retrieves the current status of a job. More...
 
static enum status_code spi_get_job_status_wait (const struct spi_module *const module)
 Retrieves the status of job once it ends. More...