bspi.c
资源名称:str711USB.rar [点击查看]
上传用户:yyyd609
上传日期:2022-07-18
资源大小:183k
文件大小:6k
源码类别:
微处理器开发
开发平台:
C/C++
- /******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
- * File Name : bspi.c
- * Author : MCD Application Team
- * Date First Issued : 05/16/2003
- * Description : This file provides all the BSPI software functions
- ********************************************************************************
- * History:
- * 01/01/2004 : V1.2
- * 14/07/2004 : V1.3
- *******************************************************************************/
- #include "bspi.h"
- /*******************************************************************************
- * Function Name : BSPI_Init
- * Description : Initializes BSPI peripheral control and registers to their default reset values.
- * Input : BSPIx where x can be 0 or 1 to select the BSPI peripheral.
- * Output : BSPI peripheral registers and BSPI global variables are initialized.
- * Return : None.
- *******************************************************************************/
- void BSPI_Init(BSPI_TypeDef *BSPIx)
- {
- BSPIx->CSR2 = 0x41;
- BSPIx->CSR1 = 0x00;
- BSPIx->CLK = 0x06;
- }
- /*******************************************************************************
- * Function Name : BSPI_TrItSrc.
- * Description : Configures the transmit interrupt source.
- * Input 1 : BSPIx where x can be 0 or 1 to select the BSPI peripheral.
- * Input 2 : TrItSrc: specifies the transmit interrupt source.
- * : Refer to the section 慣ransmit Interrupt Sources