初级会员

- 积分
- 123
- 金钱
- 123
- 注册时间
- 2020-2-19
- 在线时间
- 10 小时
|
发表于 2020-3-14 22:35:09
|
显示全部楼层
#include "max31855.h"
#include "stm32f1xx_hal.h"
/* External variables --------------------------------------------------------*/
SPI_HandleTypeDef hspi1;
/* Private variables ---------------------------------------------------------*/
float tcTemp = 0, cjTemp = 0;
bool tcError = false;
/* Private function prototypes -----------------------------------------------*/
/**
* @brief Delay about 11ns per NOP (72MHz*1.25MIPS/MHz=90MIPS)
* @param None
* @retval None
*/
static void SPI_Delay(uint32_t counter)
{
for(int i=0; i<counter; i++)
{
__NOP();
}
}
/* SPI1 init function */
void MAX31855_SPIInit(void)
{
#if SPI_SIM
GPIO_InitTypeDef GPIO_InitStruct; |
|