NANO103 BSP V3.01.004
The Board Support Package for Nano103 Series
Functions
spi.c File Reference

Nano 103 SPI driver source file. More...

#include "Nano103.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_EnableFIFO (SPI_T *spi, uint32_t u32TxThreshold, uint32_t u32RxThreshold)
 Enable FIFO mode with user-specified Tx FIFO threshold and Rx FIFO threshold configurations. More...
 
void SPI_DisableFIFO (SPI_T *spi)
 Disable FIFO mode. 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...
 
void SPI_EnableWakeup (SPI_T *spi)
 Enable wake-up function. More...
 
void SPI_DisableWakeup (SPI_T *spi)
 Disable wake-up function. More...
 

Detailed Description

Nano 103 SPI driver source file.

Version
V0.10
Revision
9
Date
16/01/12 4:58p
Note
SPDX-License-Identifier: Apache-2.0 Copyright (C) 2015 Nuvoton Technology Corp. All rights reserved.

Definition in file spi.c.