lle_spi.h

来自「BCM 控制demo源代码」· C头文件 代码 · 共 39 行

H
39
字号
/*******************************************************************************/
/**
Copyright (c) 2007 Freescale Semiconductor
\file       lle_SPI.h
\brief      Function prototypes for SPI module basic tasks
\author     Freescale Semiconductor
\author     B05114
\version    1.0
\date       April/2007
*/
/*******************************************************************************/

#ifndef _LLE_SPI_H
#define _LLE_SPI_H

/* SPI baud rate = Bus_clock /  Baud_rate_divider  */    
/* For SPI baud rate = 500kHz and Bus Clock=40 MHz, baud rate divider = 80 */
/* Baud rate divider = (SPPR+1)*2^(SPR+1) */  
#define SPI_SPPR   4    /* (SPPR+1) = 5 */       
#define SPI_SPR    3    /* 2^(SPR+1) = 16 */        

/** Function Prototypes */

/** SPI module initializing */
void lle_SPI_Init(void);

/** 8 bit transmission and reception */
UINT8 lle_SPI_8(UINT8 *ptSPI);

/** 16 bit transmission and reception */
void lle_SPI_16(UINT8 *ptSPI);

/** 24 bit transmission and reception */
void lle_SPI_24(UINT8 *ptSPI);


#endif /* _LLE_SPI_H */

/*******************************************************************************/

⌨️ 快捷键说明

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