[FL-1666] Bootloader: info screen when we going to DFU. FuriHal: port SPI to LL. Cleanup. (#634)
* FuriHal: port spi to ll. Bootloader: add spi and display. * Makefile: rollback disabled freertos introspection * FuriHal: spi lock asserts. F6: minor cleanup port sdcard shenanigans to furi_hal_gpio. * SdCard: port missing bits to furi-hal-gpio * FuriHal: fix broken RX in SPI, update SPI API usage. RFAL: more asserts in SPI platform code. * GUI: clear canvas on start. FuriHal: no pullup on radio spi bus. * FuriHal: use check instead of assert in spi lock routines * FuriHal: remove timeouts * SdHal: add guard time to SDCARD CS PIN control. * FuriHal: proper name for SPI device reconfigure routine. SdHal: one more enterprise delay and better documentation. * Bootloader: update DFU text and add image. * FuriHal: drop unused ST HAL modules. * SdHal: fixed swapped hal_gpio_init_ex arguments * SpiHal: fixed swapped hal_gpio_init_ex arguments * IrdaHal: use hal_gpio_init instead of hal_gpio_init_ex * RfidHal: fixed swapped hal_gpio_init_ex arguments Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
		| @@ -1,52 +0,0 @@ | ||||
| /** | ||||
|   ****************************************************************************** | ||||
|   * @file    adc.h | ||||
|   * @brief   This file contains all the function prototypes for | ||||
|   *          the adc.c file | ||||
|   ****************************************************************************** | ||||
|   * @attention | ||||
|   * | ||||
|   * <h2><center>© 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 __ADC_H__ | ||||
| #define __ADC_H__ | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif | ||||
|  | ||||
| /* Includes ------------------------------------------------------------------*/ | ||||
| #include "main.h" | ||||
|  | ||||
| /* USER CODE BEGIN Includes */ | ||||
|  | ||||
| /* USER CODE END Includes */ | ||||
|  | ||||
| extern ADC_HandleTypeDef hadc1; | ||||
|  | ||||
| /* USER CODE BEGIN Private defines */ | ||||
|  | ||||
| /* USER CODE END Private defines */ | ||||
|  | ||||
| void MX_ADC1_Init(void); | ||||
|  | ||||
| /* USER CODE BEGIN Prototypes */ | ||||
|  | ||||
| /* USER CODE END Prototypes */ | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #endif /* __ADC_H__ */ | ||||
|  | ||||
| /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ | ||||
| @@ -1,52 +0,0 @@ | ||||
| /** | ||||
|   ****************************************************************************** | ||||
|   * @file    crc.h | ||||
|   * @brief   This file contains all the function prototypes for | ||||
|   *          the crc.c file | ||||
|   ****************************************************************************** | ||||
|   * @attention | ||||
|   * | ||||
|   * <h2><center>© 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 __CRC_H__ | ||||
| #define __CRC_H__ | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif | ||||
|  | ||||
| /* Includes ------------------------------------------------------------------*/ | ||||
| #include "main.h" | ||||
|  | ||||
| /* USER CODE BEGIN Includes */ | ||||
|  | ||||
| /* USER CODE END Includes */ | ||||
|  | ||||
| extern CRC_HandleTypeDef hcrc; | ||||
|  | ||||
| /* USER CODE BEGIN Private defines */ | ||||
|  | ||||
| /* USER CODE END Private defines */ | ||||
|  | ||||
| void MX_CRC_Init(void); | ||||
|  | ||||
| /* USER CODE BEGIN Prototypes */ | ||||
|  | ||||
| /* USER CODE END Prototypes */ | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #endif /* __CRC_H__ */ | ||||
|  | ||||
| /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ | ||||
| @@ -117,10 +117,6 @@ void Error_Handler(void); | ||||
| #define SPI_R_SCK_GPIO_Port GPIOA | ||||
| #define SPI_R_SCK_Pin GPIO_PIN_5 | ||||
|  | ||||
| #define SPI_R hspi1 | ||||
| #define SPI_D hspi2 | ||||
| #define SPI_SD_HANDLE SPI_D | ||||
|  | ||||
| extern TIM_HandleTypeDef htim1; | ||||
| extern TIM_HandleTypeDef htim2; | ||||
| extern TIM_HandleTypeDef htim16; | ||||
|   | ||||
| @@ -1,59 +0,0 @@ | ||||
| /** | ||||
|   ****************************************************************************** | ||||
|   * @file    spi.h | ||||
|   * @brief   This file contains all the function prototypes for | ||||
|   *          the spi.c file | ||||
|   ****************************************************************************** | ||||
|   * @attention | ||||
|   * | ||||
|   * <h2><center>© 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 __SPI_H__ | ||||
| #define __SPI_H__ | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif | ||||
|  | ||||
| /* Includes ------------------------------------------------------------------*/ | ||||
| #include "main.h" | ||||
|  | ||||
| /* USER CODE BEGIN Includes */ | ||||
|  | ||||
| /* USER CODE END Includes */ | ||||
|  | ||||
| extern SPI_HandleTypeDef hspi1; | ||||
| extern SPI_HandleTypeDef hspi2; | ||||
|  | ||||
| /* USER CODE BEGIN Private defines */ | ||||
|  | ||||
| /* USER CODE END Private defines */ | ||||
|  | ||||
| void MX_SPI1_Init(void); | ||||
| void MX_SPI2_Init(void); | ||||
|  | ||||
| /* USER CODE BEGIN Prototypes */ | ||||
| void NFC_SPI_Reconfigure(); | ||||
| void SD_SPI_Reconfigure_Slow(); | ||||
| void SD_SPI_Reconfigure_Fast(); | ||||
| void CC1101_SPI_Reconfigure(); | ||||
| void SD_SPI_Bus_To_Down_State(); | ||||
| void SD_SPI_Bus_To_Normal_State(); | ||||
| /* USER CODE END Prototypes */ | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #endif /* __SPI_H__ */ | ||||
|  | ||||
| /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ | ||||
| @@ -33,30 +33,30 @@ | ||||
|   * @brief This is the list of modules to be used in the HAL driver | ||||
|   */ | ||||
| #define HAL_MODULE_ENABLED | ||||
| #define HAL_ADC_MODULE_ENABLED | ||||
| /*#define HAL_ADC_MODULE_ENABLED    */ | ||||
| #define HAL_CRYP_MODULE_ENABLED | ||||
| #define HAL_COMP_MODULE_ENABLED | ||||
| #define HAL_CRC_MODULE_ENABLED | ||||
| /*#define HAL_CRC_MODULE_ENABLED    */ | ||||
| #define HAL_HSEM_MODULE_ENABLED | ||||
| // #define HAL_I2C_MODULE_ENABLED | ||||
| /*#define HAL_I2C_MODULE_ENABLED    */ | ||||
| /*#define HAL_IPCC_MODULE_ENABLED   */ | ||||
| /*#define HAL_IRDA_MODULE_ENABLED   */ | ||||
| /*#define HAL_IWDG_MODULE_ENABLED   */ | ||||
| /*#define HAL_LCD_MODULE_ENABLED   */ | ||||
| /*#define HAL_LPTIM_MODULE_ENABLED   */ | ||||
| /*#define HAL_LCD_MODULE_ENABLED    */ | ||||
| /*#define HAL_LPTIM_MODULE_ENABLED  */ | ||||
| #define HAL_PCD_MODULE_ENABLED | ||||
| #define HAL_PKA_MODULE_ENABLED | ||||
| /*#define HAL_QSPI_MODULE_ENABLED   */ | ||||
| #define HAL_RNG_MODULE_ENABLED | ||||
| #define HAL_RTC_MODULE_ENABLED | ||||
| /*#define HAL_SAI_MODULE_ENABLED   */ | ||||
| /*#define HAL_SMBUS_MODULE_ENABLED   */ | ||||
| /*#define HAL_SAI_MODULE_ENABLED    */ | ||||
| /*#define HAL_SMBUS_MODULE_ENABLED  */ | ||||
| /*#define HAL_SMARTCARD_MODULE_ENABLED   */ | ||||
| #define HAL_SPI_MODULE_ENABLED | ||||
| /*#define HAL_SPI_MODULE_ENABLED    */ | ||||
| #define HAL_TIM_MODULE_ENABLED | ||||
| /*#define HAL_TSC_MODULE_ENABLED   */ | ||||
| #define HAL_UART_MODULE_ENABLED | ||||
| /*#define HAL_USART_MODULE_ENABLED   */ | ||||
| /*#define HAL_TSC_MODULE_ENABLED    */ | ||||
| /*#define HAL_UART_MODULE_ENABLED   */ | ||||
| /*#define HAL_USART_MODULE_ENABLED  */ | ||||
| /*#define HAL_WWDG_MODULE_ENABLED   */ | ||||
| #define HAL_EXTI_MODULE_ENABLED | ||||
| #define HAL_CORTEX_MODULE_ENABLED | ||||
| @@ -172,7 +172,7 @@ | ||||
|   * @brief This is the HAL system configuration section | ||||
|   */ | ||||
|  | ||||
| #define  VDD_VALUE				3300U                   /*!< Value of VDD in mv */ | ||||
| #define  VDD_VALUE                    3300U   /*!< Value of VDD in mv */ | ||||
| #define  TICK_INT_PRIORITY            0U      /*!< tick interrupt priority */ | ||||
| #define  USE_RTOS                     0U | ||||
| #define  PREFETCH_ENABLE              1U | ||||
|   | ||||
		Reference in New Issue
	
	Block a user