增加协议 发送队列 50ms发送数据

“
”
This commit is contained in:
Hjh
2025-01-15 16:02:53 +08:00
commit e48aa3d84b
271 changed files with 93708 additions and 0 deletions

43
BSP/Inc/spi1.h Normal file
View 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__