增加协议 发送队列 50ms发送数据
“ ”
This commit is contained in:
43
BSP/Inc/spi1.h
Normal file
43
BSP/Inc/spi1.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* FILE : spi.h
|
||||
* DESCRIPTION : This file is iHMI43 spi header.
|
||||
* Author : XiaomaGee@Gmail.com
|
||||
* Copyright :
|
||||
*
|
||||
* History
|
||||
* --------------------
|
||||
* Rev : 0.00
|
||||
* Date : 03/05/2012
|
||||
*
|
||||
* create.
|
||||
* --------------------
|
||||
*/
|
||||
#ifndef __SPI1_H__
|
||||
#define __SPI1_H__
|
||||
|
||||
#include "stm32f4xx_rcc.h"
|
||||
#include "stm32f4xx_spi.h"
|
||||
#include "stm32f4xx_gpio.h"
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
//-----------------Include files-------------------------//
|
||||
|
||||
//------------------- Define ----------------------------//
|
||||
|
||||
#define SPI1_CS_OFF GPIO_ResetBits(GPIOA,GPIO_Pin_4)
|
||||
#define SPI1_CS_ON GPIO_SetBits(GPIOA,GPIO_Pin_4)
|
||||
|
||||
//------------------- Typedef --------------------------//
|
||||
|
||||
typedef struct{
|
||||
int (* initialize)(void);
|
||||
int (* write)(int /* number */,uint8_t * /* buffer */);
|
||||
uint8_t (* send_data)(uint8_t );
|
||||
}SPI1_T;
|
||||
|
||||
//------------------- Extern --------------------------//
|
||||
|
||||
extern SPI1_T spi1;
|
||||
|
||||
#endif //__SPI6_H__
|
||||
Reference in New Issue
Block a user