STM8S/A Standard Peripherals Drivers
|
This file contains all the functions for the SPI peripheral. More...
#include "stm8s_spi.h"
Go to the source code of this file.
Functions | |
void | SPI_BiDirectionalLineConfig (SPI_Direction_TypeDef SPI_Direction) |
Selects the data transfer direction in bi-directional mode. | |
void | SPI_CalculateCRCCmd (FunctionalState NewState) |
Enables or disables the CRC value calculation of the transferred bytes. | |
void | SPI_ClearFlag (SPI_Flag_TypeDef SPI_FLAG) |
Clears the SPI flags. | |
void | SPI_ClearITPendingBit (SPI_IT_TypeDef SPI_IT) |
Clears the interrupt pending bits. | |
void | SPI_Cmd (FunctionalState NewState) |
Enables or disables the SPI peripheral. | |
void | SPI_DeInit (void) |
Deinitializes the SPI peripheral registers to their default reset values. | |
uint8_t | SPI_GetCRC (SPI_CRC_TypeDef SPI_CRC) |
Returns the transmit or the receive CRC register value. | |
uint8_t | SPI_GetCRCPolynomial (void) |
Returns the CRC Polynomial register value. | |
FlagStatus | SPI_GetFlagStatus (SPI_Flag_TypeDef SPI_FLAG) |
Checks whether the specified SPI flag is set or not. | |
ITStatus | SPI_GetITStatus (SPI_IT_TypeDef SPI_IT) |
Checks whether the specified interrupt has occurred or not. | |
void | SPI_Init (SPI_FirstBit_TypeDef FirstBit, SPI_BaudRatePrescaler_TypeDef BaudRatePrescaler, SPI_Mode_TypeDef Mode, SPI_ClockPolarity_TypeDef ClockPolarity, SPI_ClockPhase_TypeDef ClockPhase, SPI_DataDirection_TypeDef Data_Direction, SPI_NSS_TypeDef Slave_Management, uint8_t CRCPolynomial) |
Initializes the SPI according to the specified parameters. | |
void | SPI_ITConfig (SPI_IT_TypeDef SPI_IT, FunctionalState NewState) |
Enables or disables the specified interrupts. | |
void | SPI_NSSInternalSoftwareCmd (FunctionalState NewState) |
Configures internally by software the NSS pin. | |
uint8_t | SPI_ReceiveData (void) |
Returns the most recent received data by the SPI peripheral. | |
void | SPI_ResetCRC (void) |
Reset the Rx CRCR and Tx CRCR registers. | |
void | SPI_SendData (uint8_t Data) |
Transmits a Data through the SPI peripheral. | |
void | SPI_TransmitCRC (void) |
Enables the transmit of the CRC value. |
Detailed Description
This file contains all the functions for the SPI peripheral.
- Attention:
© COPYRIGHT 2014 STMicroelectronics
Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.st.com/software_license_agreement_liberty_v2
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file stm8s_spi.c.