Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
Description
This topic describes the basic architecture of the SPI Driver Library and provides information and examples on how to use it.
Interface Header File
: drv_spi.h
The interface to the SPI Driver library is defined in the "drv_spi.h" header file. Any C language source (.c) file that uses the
SPI Driver library should include this header.
The library interface routines are divided into various subsections, each of the sub section addresses one of the blocks or
the overall operation of the SPI module.
Library Interface Section Description
Initialization Provides module initialization, deinitialization and setup functions
Data Transfer Functions Provides data transfer functions available in the configuration.
Configuration Provides driver configuration macros
Data Types and Constants Provides data types and constants
1.3.1.1 Abstraction Model
Different types of SPIs are available on Microchip microcontrollers. Some have an internal buffer mechanism and some do
not. The buffer depth varies across part families. The SPI driver abstracts out these differences and provides a unified model
for data transfer across different types of SPIs available.
Both transmitter and receiver provides a buffer in the driver which transmits and receives data to/from the hardware. The SPI
driver provides a set of interfaces to perform the read and the write.
The diagrams below illustrates the model used by the SPI driver for transmitter and receiver.
Receiver Abstraction Model
Transmitter Abstraction Model
1.3 SPI Driver MLA - Drivers Help Using Driver
69
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_driver.pdf