NUC472_NUC442_BSP V3.03.004
The Board Support Package for NUC472/NUC442
Functions
spi.c File Reference

NUC472/NUC442 SPI driver source file. More...

#include "NUC472_442.h"
Include dependency graph for spi.c:

Go to the source code of this file.

Functions

uint32_t SPI_Open (SPI_T *spi, uint32_t u32MasterSlave, uint32_t u32SPIMode, uint32_t u32DataWidth, uint32_t u32BusClock)
 This function make SPI module be ready to transfer. By default, the SPI transfer sequence is MSB first and the automatic slave select function is disabled. In Slave mode, the u32BusClock must be NULL and the SPI clock divider setting will be 0. More...
 
void SPI_Close (SPI_T *spi)
 Reset SPI module and disable SPI peripheral clock. More...
 
void SPI_ClearRxFIFO (SPI_T *spi)
 Clear Rx FIFO buffer. More...
 
void SPI_ClearTxFIFO (SPI_T *spi)
 Clear Tx FIFO buffer. More...
 
void SPI_DisableAutoSS (SPI_T *spi)
 Disable the automatic slave select function. More...
 
void SPI_EnableAutoSS (SPI_T *spi, uint32_t u32SSPinMask, uint32_t u32ActiveLevel)
 Enable the automatic slave select function. Only available in Master mode. More...
 
uint32_t SPI_SetBusClock (SPI_T *spi, uint32_t u32BusClock)
 Set the SPI bus clock. Only available in Master mode. More...
 
void SPI_SetFIFOThreshold (SPI_T *spi, uint32_t u32TxThreshold, uint32_t u32RxThreshold)
 Set Tx FIFO threshold and Rx FIFO threshold configurations. More...
 
uint32_t SPI_GetBusClock (SPI_T *spi)
 Get the actual frequency of SPI bus clock. Only available in Master mode. More...
 
void SPI_EnableInt (SPI_T *spi, uint32_t u32Mask)
 Enable FIFO related interrupts specified by u32Mask parameter. More...
 
void SPI_DisableInt (SPI_T *spi, uint32_t u32Mask)
 Disable FIFO related interrupts specified by u32Mask parameter. More...
 

Detailed Description

NUC472/NUC442 SPI driver source file.

Version
V0.10
Revision
16
Date
15/06/18 4:00p
Note
SPDX-License-Identifier: Apache-2.0 Copyright (C) 2014 Nuvoton Technology Corp. All rights reserved.

Definition in file spi.c.