2.114.2 SPIx_Deinitialize Function

C

/* x = SPI instance number */

/* SPI host and client mode */
void SPIx_Deinitialize (void)

Summary

Deinitializes the SPI peripheral of the device.

Description

his function deinitializes the SPI Peripheral Library (PLIB) of the device, returning the SPI peripheral to its default reset state. After calling this function, the SPI peripheral will no longer be operational, and any subsequent SPI operations will fail until re-initialization using the SPIx_Initialize API.

Precondition

The SPI peripheral must have been initialized using the SPIx_Initialize API. This function should be called when the SPI peripheral is no longer required to release resources and ensure proper reset behavior.

Parameters

None.

Returns

None.

Example

SPI1_Initialize();
SPI1_Deinitialize();

Remarks

None.