Jump to main content

##

# 2.114.1 SPIx_Initialize Function

## C

    /* x = SPI instance number */

    /* SPI master and slave mode */
    void SPIx_Initialize (void)

## Summary

Initializes SPI module of the device

## Description

This function initializes SPI PLIB of the device with the values configured in MCC GUI. Once the peripheral is initialized, transfer APIs can be used to transfer the data.

## Precondition

MCC GUI should be configured with the right values.

## Parameters

None.

## Returns

None.

## Example

    SPI1_Initialize();

## Remarks

This function must be called only once and before any other SPI function is called.