1.27.22.13 1.34.20.13 1.35.13.13 SPIx_ChipSelectSetup Function

C

/* x = SPI instance number */

/* SPI master mode */
void SPIx_ChipSelectSetup(SPI_CHIP_SELECT chipSelect)

Summary

Enables the specified hardware chip select

Description

This function allows application to activate the specified chip select. The SPI clock phase, clock polarity, baud rate and other settings for the specified hardware chip select become active. This API must be called to switch between multiple hardware chip select lines.

Precondition

The SPIx_Initialize() should have been called.

Parameters

chipSelect - One of the hardware chip select from the SPI_CHIP_SELECT enum

Returns

None

Example

	// Select NPCS1 Chip select line
	SPI1_ChipSelectSetup(SPI_CHIP_SELECT_NPCS1);

Remarks

None.