API HAL: takeover i2c initialization and abstraction. Update I2C drivers to match new api. Back port API HAL to bootloader and enable light support for F5. (#356)

Co-authored-by: coreglitch <mail@s3f.ru>
This commit is contained in:
あく
2021-03-02 14:45:47 +03:00
committed by GitHub
parent 056e6ffa9c
commit 38011e88f3
26 changed files with 388 additions and 444 deletions

View File

@@ -1,54 +0,0 @@
/**
******************************************************************************
* @file i2c.h
* @brief This file contains all the function prototypes for
* the i2c.c file
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __I2C_H__
#define __I2C_H__
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
extern I2C_HandleTypeDef hi2c1;
/* USER CODE BEGIN Private defines */
#define POWER_I2C hi2c1
/* USER CODE END Private defines */
void MX_I2C1_Init(void);
/* USER CODE BEGIN Prototypes */
/* USER CODE END Prototypes */
#ifdef __cplusplus
}
#endif
#endif /* __I2C_H__ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -99,8 +99,6 @@ void Error_Handler(void);
#define RFID_PULL_Pin GPIO_PIN_8
#define RFID_PULL_GPIO_Port GPIOA
#define RFID_PULL_EXTI_IRQn EXTI9_5_IRQn
#define I2C_SCL_Pin GPIO_PIN_9
#define I2C_SCL_GPIO_Port GPIOA
#define CC1101_G0_Pin GPIO_PIN_4
#define CC1101_G0_GPIO_Port GPIOC
#define RFID_RF_IN_Pin GPIO_PIN_5
@@ -131,8 +129,6 @@ void Error_Handler(void);
#define SPI_D_MOSI_GPIO_Port GPIOB
#define DISPLAY_DI_Pin GPIO_PIN_6
#define DISPLAY_DI_GPIO_Port GPIOC
#define I2C_SDA_Pin GPIO_PIN_10
#define I2C_SDA_GPIO_Port GPIOA
#define SD_CD_Pin GPIO_PIN_15
#define SD_CD_GPIO_Port GPIOA
#define VIBRO_Pin GPIO_PIN_10