PreviousNext
disableSPI
Help > OS functions > SPI > disableSPI

Function

 

Switch SPI HW module off and configure SPI pins as I/Os

Purpose

 

Disable SPI communication

Syntax

 

void disableSPI()

Parameters

 

  –

Return value

 

  –

Output values

 

SPI Status is switched to SPI not active.

Preconditions

 

  –

Remarks

 

The PIC internal SPI hardware module is disabled and related pins (C5 to C8 or Q6 to Q9) are reconfigured as general I/Os. See IQRF SPI Technical guide and Example E07-SPI.

Side effects

 

•     The appropriate PIC pins are not restored to the state before enableSPI calling.

•     Current packet is lost by both sides if SPI communication is running on background at this moment.

See also

 

enableSPI, startSPI, stopSPI, getStatusSPI, restartSPI

Example

 

See getStatusSPI