bspi.c

来自「freemodbus-v1-1-1-0.zip v1.1.1版本的代码 支持多」· C语言 代码 · 共 42 行

C
42
字号
/******************** (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:*  24/05/2005 : V3.0*  30/11/2004 : V2.0*  14/07/2004 : V1.3*  01/01/2004 : V1.2******************************************************************************* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.*******************************************************************************/#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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?