├── .cproject ├── .github └── stale.yml ├── .gitignore ├── .gitmodules ├── .mxproject ├── .project ├── .settings └── language.settings.xml ├── Core ├── Inc │ ├── main.h │ ├── stm32f4xx_hal_conf.h │ └── stm32f4xx_it.h ├── Src │ ├── main.c │ ├── stm32f4xx_hal_msp.c │ ├── stm32f4xx_it.c │ ├── syscalls.c │ ├── sysmem.c │ └── system_stm32f4xx.c └── Startup │ └── startup_stm32f469nihx.s ├── Drivers ├── BSP │ ├── Components │ │ ├── Common │ │ │ ├── Release_Notes.html │ │ │ ├── accelero.h │ │ │ ├── audio.h │ │ │ ├── camera.h │ │ │ ├── epd.h │ │ │ ├── gyro.h │ │ │ ├── idd.h │ │ │ ├── io.h │ │ │ ├── lcd.h │ │ │ ├── magneto.h │ │ │ ├── ts.h │ │ │ └── tsensor.h │ │ ├── cs43l22 │ │ │ ├── Release_Notes.html │ │ │ ├── cs43l22.c │ │ │ └── cs43l22.h │ │ ├── ft6x06 │ │ │ ├── Release_Notes.html │ │ │ ├── _htmresc │ │ │ │ ├── mini-st.css │ │ │ │ └── st_logo.png │ │ │ ├── ft6x06.c │ │ │ └── ft6x06.h │ │ ├── n25q128a │ │ │ ├── Release_Notes.html │ │ │ └── n25q128a.h │ │ ├── nt35510 │ │ │ ├── Release_Notes.html │ │ │ ├── _htmresc │ │ │ │ ├── mini-st.css │ │ │ │ └── st_logo.png │ │ │ ├── nt35510.c │ │ │ └── nt35510.h │ │ └── otm8009a │ │ │ ├── Release_Notes.html │ │ │ ├── otm8009a.c │ │ │ └── otm8009a.h │ └── STM32469I-Discovery │ │ ├── LICENSE.txt │ │ ├── Release_Notes.html │ │ ├── STM32469I-Discovery_BSP_User_Manual.chm │ │ ├── _htmresc │ │ ├── mini-st.css │ │ └── st_logo.png │ │ ├── stm32469i_discovery.c │ │ ├── stm32469i_discovery.h │ │ ├── stm32469i_discovery_audio.c │ │ ├── stm32469i_discovery_audio.h │ │ ├── stm32469i_discovery_eeprom.c │ │ ├── stm32469i_discovery_eeprom.h │ │ ├── stm32469i_discovery_lcd.c │ │ ├── stm32469i_discovery_lcd.h │ │ ├── stm32469i_discovery_qspi.c │ │ ├── stm32469i_discovery_qspi.h │ │ ├── stm32469i_discovery_sd.c │ │ ├── stm32469i_discovery_sd.h │ │ ├── stm32469i_discovery_sdram.c │ │ ├── stm32469i_discovery_sdram.h │ │ ├── stm32469i_discovery_ts.c │ │ └── stm32469i_discovery_ts.h ├── CMSIS │ ├── Device │ │ └── ST │ │ │ └── STM32F4xx │ │ │ ├── Include │ │ │ ├── stm32f469xx.h │ │ │ ├── stm32f4xx.h │ │ │ └── system_stm32f4xx.h │ │ │ └── LICENSE.txt │ ├── Include │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armclang.h │ │ ├── cmsis_compiler.h │ │ ├── cmsis_gcc.h │ │ ├── cmsis_iccarm.h │ │ ├── cmsis_version.h │ │ ├── core_armv8mbl.h │ │ ├── core_armv8mml.h │ │ ├── core_cm0.h │ │ ├── core_cm0plus.h │ │ ├── core_cm1.h │ │ ├── core_cm23.h │ │ ├── core_cm3.h │ │ ├── core_cm33.h │ │ ├── core_cm4.h │ │ ├── core_cm7.h │ │ ├── core_sc000.h │ │ ├── core_sc300.h │ │ ├── mpu_armv7.h │ │ ├── mpu_armv8.h │ │ └── tz_context.h │ └── LICENSE.txt ├── STM32F4xx_HAL_Driver │ ├── Inc │ │ ├── Legacy │ │ │ └── stm32_hal_legacy.h │ │ ├── stm32f4xx_hal.h │ │ ├── stm32f4xx_hal_cortex.h │ │ ├── stm32f4xx_hal_def.h │ │ ├── stm32f4xx_hal_dma.h │ │ ├── stm32f4xx_hal_dma2d.h │ │ ├── stm32f4xx_hal_dma_ex.h │ │ ├── stm32f4xx_hal_dsi.h │ │ ├── stm32f4xx_hal_exti.h │ │ ├── stm32f4xx_hal_flash.h │ │ ├── stm32f4xx_hal_flash_ex.h │ │ ├── stm32f4xx_hal_flash_ramfunc.h │ │ ├── stm32f4xx_hal_gpio.h │ │ ├── stm32f4xx_hal_gpio_ex.h │ │ ├── stm32f4xx_hal_i2c.h │ │ ├── stm32f4xx_hal_i2c_ex.h │ │ ├── stm32f4xx_hal_ltdc.h │ │ ├── stm32f4xx_hal_ltdc_ex.h │ │ ├── stm32f4xx_hal_pwr.h │ │ ├── stm32f4xx_hal_pwr_ex.h │ │ ├── stm32f4xx_hal_rcc.h │ │ ├── stm32f4xx_hal_rcc_ex.h │ │ ├── stm32f4xx_hal_sdram.h │ │ ├── stm32f4xx_hal_tim.h │ │ ├── stm32f4xx_hal_tim_ex.h │ │ ├── stm32f4xx_hal_uart.h │ │ ├── stm32f4xx_ll_bus.h │ │ ├── stm32f4xx_ll_cortex.h │ │ ├── stm32f4xx_ll_dma.h │ │ ├── stm32f4xx_ll_dma2d.h │ │ ├── stm32f4xx_ll_exti.h │ │ ├── stm32f4xx_ll_fmc.h │ │ ├── stm32f4xx_ll_gpio.h │ │ ├── stm32f4xx_ll_i2c.h │ │ ├── stm32f4xx_ll_pwr.h │ │ ├── stm32f4xx_ll_rcc.h │ │ ├── stm32f4xx_ll_system.h │ │ ├── stm32f4xx_ll_usart.h │ │ └── stm32f4xx_ll_utils.h │ ├── LICENSE.txt │ └── Src │ │ ├── stm32f4xx_hal.c │ │ ├── stm32f4xx_hal_cortex.c │ │ ├── stm32f4xx_hal_dma.c │ │ ├── stm32f4xx_hal_dma2d.c │ │ ├── stm32f4xx_hal_dma_ex.c │ │ ├── stm32f4xx_hal_dsi.c │ │ ├── stm32f4xx_hal_exti.c │ │ ├── stm32f4xx_hal_flash.c │ │ ├── stm32f4xx_hal_flash_ex.c │ │ ├── stm32f4xx_hal_flash_ramfunc.c │ │ ├── stm32f4xx_hal_gpio.c │ │ ├── stm32f4xx_hal_i2c.c │ │ ├── stm32f4xx_hal_i2c_ex.c │ │ ├── stm32f4xx_hal_ltdc.c │ │ ├── stm32f4xx_hal_ltdc_ex.c │ │ ├── stm32f4xx_hal_pwr.c │ │ ├── stm32f4xx_hal_pwr_ex.c │ │ ├── stm32f4xx_hal_rcc.c │ │ ├── stm32f4xx_hal_rcc_ex.c │ │ ├── stm32f4xx_hal_sdram.c │ │ ├── stm32f4xx_hal_tim.c │ │ ├── stm32f4xx_hal_tim_ex.c │ │ ├── stm32f4xx_hal_uart.c │ │ └── stm32f4xx_ll_fmc.c ├── hal_stm_lvgl │ ├── screen_driver.c │ ├── screen_driver.h │ ├── touch_sensor_driver.c │ └── touch_sensor_driver.h └── lv_conf.h ├── LVGL_STM32f469I_Disco.ioc ├── README.md ├── STM32F469NIHX_FLASH.ld ├── STM32F469NIHX_RAM.ld └── Utilities ├── Fonts ├── Release_Notes.html ├── font12.c ├── font16.c ├── font20.c ├── font24.c ├── font8.c └── fonts.h └── Log ├── Release_Notes.html ├── lcd_log.c ├── lcd_log.h └── lcd_log_conf_template.h /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 21 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - architecture 8 | - pinned 9 | # Label to use when marking an issue as stale 10 | staleLabel: stale 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue or pull request has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .metadata 2 | bin/ 3 | tmp/ 4 | *.tmp 5 | *.bak 6 | *.swp 7 | *~.nib 8 | local.properties 9 | .settings/ 10 | .loadpath 11 | .recommenders 12 | 13 | # External tool builders 14 | .externalToolBuilders/ 15 | 16 | # Locally stored "Eclipse launch configurations" 17 | *.launch 18 | 19 | # CDT- autotools 20 | .autotools 21 | 22 | # sbteclipse plugin 23 | .target 24 | 25 | # Code Recommenders 26 | .recommenders/ 27 | 28 | Debug/ 29 | Release/ -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Drivers/lvgl"] 2 | path = Drivers/lvgl 3 | url = https://github.com/lvgl/lvgl 4 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | LVGL_STM32f469I_Disco 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | com.st.stm32cube.ide.mcu.MCUProjectNature 23 | com.st.stm32cube.ide.mcu.MCUCubeProjectNature 24 | org.eclipse.cdt.core.cnature 25 | com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature 26 | com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature 27 | com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature 28 | com.st.stm32cube.ide.mcu.MCURootProjectNature 29 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 30 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 31 | 32 | 33 | 34 | Drivers/BSP/Components/ft6x06.c 35 | 1 36 | PROJECT_LOC/Drivers/BSP/Components/ft6x06/ft6x06.c 37 | 38 | 39 | Drivers/BSP/Components/nt35510.c 40 | 1 41 | PROJECT_LOC/Drivers/BSP/Components/nt35510/nt35510.c 42 | 43 | 44 | Drivers/BSP/Components/otm8009a.c 45 | 1 46 | PROJECT_LOC/Drivers/BSP/Components/otm8009a/otm8009a.c 47 | 48 | 49 | Drivers/BSP/STM32469I-Discovery/stm32469i_discovery.c 50 | 1 51 | PROJECT_LOC/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery.c 52 | 53 | 54 | Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_lcd.c 55 | 1 56 | PROJECT_LOC/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_lcd.c 57 | 58 | 59 | Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_ts.c 60 | 1 61 | PROJECT_LOC/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_ts.c 62 | 63 | 64 | 65 | 66 | 1676576590488 67 | Drivers/BSP/Components 68 | 13 69 | 70 | org.eclipse.ui.ide.multiFilter 71 | 72 | 73 | 74 | 1676576580039 75 | Drivers/BSP/STM32469I-Discovery 76 | 13 77 | 78 | org.eclipse.ui.ide.multiFilter 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Core/Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2023 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __MAIN_H 23 | #define __MAIN_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Includes ------------------------------------------------------------------*/ 30 | #include "stm32f4xx_hal.h" 31 | 32 | /* Private includes ----------------------------------------------------------*/ 33 | /* USER CODE BEGIN Includes */ 34 | 35 | /* USER CODE END Includes */ 36 | 37 | /* Exported types ------------------------------------------------------------*/ 38 | /* USER CODE BEGIN ET */ 39 | 40 | /* USER CODE END ET */ 41 | 42 | /* Exported constants --------------------------------------------------------*/ 43 | /* USER CODE BEGIN EC */ 44 | 45 | /* USER CODE END EC */ 46 | 47 | /* Exported macro ------------------------------------------------------------*/ 48 | /* USER CODE BEGIN EM */ 49 | 50 | /* USER CODE END EM */ 51 | 52 | /* Exported functions prototypes ---------------------------------------------*/ 53 | void Error_Handler(void); 54 | 55 | /* USER CODE BEGIN EFP */ 56 | 57 | /* USER CODE END EFP */ 58 | 59 | /* Private defines -----------------------------------------------------------*/ 60 | #define FMC_NBL1_Pin GPIO_PIN_1 61 | #define FMC_NBL1_GPIO_Port GPIOE 62 | #define FMC_NBL0_Pin GPIO_PIN_0 63 | #define FMC_NBL0_GPIO_Port GPIOE 64 | #define I2C1_SCL_Pin GPIO_PIN_8 65 | #define I2C1_SCL_GPIO_Port GPIOB 66 | #define SWCLK_Pin GPIO_PIN_14 67 | #define SWCLK_GPIO_Port GPIOA 68 | #define SWDIO_Pin GPIO_PIN_13 69 | #define SWDIO_GPIO_Port GPIOA 70 | #define I2C1_SDA_Pin GPIO_PIN_9 71 | #define I2C1_SDA_GPIO_Port GPIOB 72 | #define SDNCAS_Pin GPIO_PIN_15 73 | #define SDNCAS_GPIO_Port GPIOG 74 | #define D2_Pin GPIO_PIN_0 75 | #define D2_GPIO_Port GPIOD 76 | #define FMC_NBL2_Pin GPIO_PIN_4 77 | #define FMC_NBL2_GPIO_Port GPIOI 78 | #define LED3_Pin GPIO_PIN_5 79 | #define LED3_GPIO_Port GPIOD 80 | #define D3_Pin GPIO_PIN_1 81 | #define D3_GPIO_Port GPIOD 82 | #define D27_Pin GPIO_PIN_3 83 | #define D27_GPIO_Port GPIOI 84 | #define D26_Pin GPIO_PIN_2 85 | #define D26_GPIO_Port GPIOI 86 | #define A0_Pin GPIO_PIN_0 87 | #define A0_GPIO_Port GPIOF 88 | #define FMC_NBL3_Pin GPIO_PIN_5 89 | #define FMC_NBL3_GPIO_Port GPIOI 90 | #define D29_Pin GPIO_PIN_7 91 | #define D29_GPIO_Port GPIOI 92 | #define D31_Pin GPIO_PIN_10 93 | #define D31_GPIO_Port GPIOI 94 | #define D28_Pin GPIO_PIN_6 95 | #define D28_GPIO_Port GPIOI 96 | #define LED4_Pin GPIO_PIN_3 97 | #define LED4_GPIO_Port GPIOK 98 | #define LED2_Pin GPIO_PIN_4 99 | #define LED2_GPIO_Port GPIOD 100 | #define D23_Pin GPIO_PIN_15 101 | #define D23_GPIO_Port GPIOH 102 | #define D25_Pin GPIO_PIN_1 103 | #define D25_GPIO_Port GPIOI 104 | #define A1_Pin GPIO_PIN_1 105 | #define A1_GPIO_Port GPIOF 106 | #define D30_Pin GPIO_PIN_9 107 | #define D30_GPIO_Port GPIOI 108 | #define D21_Pin GPIO_PIN_13 109 | #define D21_GPIO_Port GPIOH 110 | #define D22_Pin GPIO_PIN_14 111 | #define D22_GPIO_Port GPIOH 112 | #define D24_Pin GPIO_PIN_0 113 | #define D24_GPIO_Port GPIOI 114 | #define A2_Pin GPIO_PIN_2 115 | #define A2_GPIO_Port GPIOF 116 | #define A3_Pin GPIO_PIN_3 117 | #define A3_GPIO_Port GPIOF 118 | #define SDCLK_Pin GPIO_PIN_8 119 | #define SDCLK_GPIO_Port GPIOG 120 | #define A4_Pin GPIO_PIN_4 121 | #define A4_GPIO_Port GPIOF 122 | #define SDNE0_Pin GPIO_PIN_3 123 | #define SDNE0_GPIO_Port GPIOH 124 | #define LED1_Pin GPIO_PIN_6 125 | #define LED1_GPIO_Port GPIOG 126 | #define A5_Pin GPIO_PIN_5 127 | #define A5_GPIO_Port GPIOF 128 | #define SDCKE0_Pin GPIO_PIN_2 129 | #define SDCKE0_GPIO_Port GPIOH 130 | #define D1_Pin GPIO_PIN_15 131 | #define D1_GPIO_Port GPIOD 132 | #define D15_Pin GPIO_PIN_10 133 | #define D15_GPIO_Port GPIOD 134 | #define D0_Pin GPIO_PIN_14 135 | #define D0_GPIO_Port GPIOD 136 | #define D14_Pin GPIO_PIN_9 137 | #define D14_GPIO_Port GPIOD 138 | #define D13_Pin GPIO_PIN_8 139 | #define D13_GPIO_Port GPIOD 140 | #define SDNWE_Pin GPIO_PIN_0 141 | #define SDNWE_GPIO_Port GPIOC 142 | #define OTG_FS1_PowerSwitchOn_Pin GPIO_PIN_2 143 | #define OTG_FS1_PowerSwitchOn_GPIO_Port GPIOB 144 | #define A6_Pin GPIO_PIN_12 145 | #define A6_GPIO_Port GPIOF 146 | #define A11_Pin GPIO_PIN_1 147 | #define A11_GPIO_Port GPIOG 148 | #define A9_Pin GPIO_PIN_15 149 | #define A9_GPIO_Port GPIOF 150 | #define LCD_INT_Pin GPIO_PIN_5 151 | #define LCD_INT_GPIO_Port GPIOJ 152 | #define D20_Pin GPIO_PIN_12 153 | #define D20_GPIO_Port GPIOH 154 | #define WAKEUP_Pin GPIO_PIN_0 155 | #define WAKEUP_GPIO_Port GPIOA 156 | #define A7_Pin GPIO_PIN_13 157 | #define A7_GPIO_Port GPIOF 158 | #define A10_Pin GPIO_PIN_0 159 | #define A10_GPIO_Port GPIOG 160 | #define D5_Pin GPIO_PIN_8 161 | #define D5_GPIO_Port GPIOE 162 | #define D17_Pin GPIO_PIN_9 163 | #define D17_GPIO_Port GPIOH 164 | #define D19_Pin GPIO_PIN_11 165 | #define D19_GPIO_Port GPIOH 166 | #define A8_Pin GPIO_PIN_14 167 | #define A8_GPIO_Port GPIOF 168 | #define DSI_TE_Pin GPIO_PIN_2 169 | #define DSI_TE_GPIO_Port GPIOJ 170 | #define SDNMT48LC4M32B2B5_6A_RAS_RAS___Pin GPIO_PIN_11 171 | #define SDNMT48LC4M32B2B5_6A_RAS_RAS___GPIO_Port GPIOF 172 | #define D6_Pin GPIO_PIN_9 173 | #define D6_GPIO_Port GPIOE 174 | #define D8_Pin GPIO_PIN_11 175 | #define D8_GPIO_Port GPIOE 176 | #define D11_Pin GPIO_PIN_14 177 | #define D11_GPIO_Port GPIOE 178 | #define STLK_RX_Pin GPIO_PIN_10 179 | #define STLK_RX_GPIO_Port GPIOB 180 | #define D16_Pin GPIO_PIN_8 181 | #define D16_GPIO_Port GPIOH 182 | #define D18_Pin GPIO_PIN_10 183 | #define D18_GPIO_Port GPIOH 184 | #define EXT_RESET_Pin GPIO_PIN_0 185 | #define EXT_RESET_GPIO_Port GPIOB 186 | #define D4_Pin GPIO_PIN_7 187 | #define D4_GPIO_Port GPIOE 188 | #define D7_Pin GPIO_PIN_10 189 | #define D7_GPIO_Port GPIOE 190 | #define D9_Pin GPIO_PIN_12 191 | #define D9_GPIO_Port GPIOE 192 | #define D12_Pin GPIO_PIN_15 193 | #define D12_GPIO_Port GPIOE 194 | #define D10_Pin GPIO_PIN_13 195 | #define D10_GPIO_Port GPIOE 196 | #define STLK_TX_Pin GPIO_PIN_11 197 | #define STLK_TX_GPIO_Port GPIOB 198 | 199 | /* USER CODE BEGIN Private defines */ 200 | 201 | /* USER CODE END Private defines */ 202 | 203 | #ifdef __cplusplus 204 | } 205 | #endif 206 | 207 | #endif /* __MAIN_H */ 208 | -------------------------------------------------------------------------------- /Core/Inc/stm32f4xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f4xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2023 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file 13 | * in the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | * 16 | ****************************************************************************** 17 | */ 18 | /* USER CODE END Header */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32F4xx_IT_H 22 | #define __STM32F4xx_IT_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Private includes ----------------------------------------------------------*/ 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | /* Exported types ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN ET */ 35 | 36 | /* USER CODE END ET */ 37 | 38 | /* Exported constants --------------------------------------------------------*/ 39 | /* USER CODE BEGIN EC */ 40 | 41 | /* USER CODE END EC */ 42 | 43 | /* Exported macro ------------------------------------------------------------*/ 44 | /* USER CODE BEGIN EM */ 45 | 46 | /* USER CODE END EM */ 47 | 48 | /* Exported functions prototypes ---------------------------------------------*/ 49 | void NMI_Handler(void); 50 | void HardFault_Handler(void); 51 | void MemManage_Handler(void); 52 | void BusFault_Handler(void); 53 | void UsageFault_Handler(void); 54 | void SVC_Handler(void); 55 | void DebugMon_Handler(void); 56 | void PendSV_Handler(void); 57 | void SysTick_Handler(void); 58 | void DMA2_Stream0_IRQHandler(void); 59 | void LTDC_IRQHandler(void); 60 | void DMA2D_IRQHandler(void); 61 | void DSI_IRQHandler(void); 62 | /* USER CODE BEGIN EFP */ 63 | 64 | /* USER CODE END EFP */ 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif /* __STM32F4xx_IT_H */ 71 | -------------------------------------------------------------------------------- /Core/Src/stm32f4xx_it.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f4xx_it.c 5 | * @brief Interrupt Service Routines. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2023 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file 13 | * in the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | * 16 | ****************************************************************************** 17 | */ 18 | /* USER CODE END Header */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "main.h" 22 | #include "stm32f4xx_it.h" 23 | /* Private includes ----------------------------------------------------------*/ 24 | /* USER CODE BEGIN Includes */ 25 | #include 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN PD */ 35 | 36 | /* USER CODE END PD */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN PM */ 40 | 41 | /* USER CODE END PM */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* Private user code ---------------------------------------------------------*/ 54 | /* USER CODE BEGIN 0 */ 55 | 56 | /* USER CODE END 0 */ 57 | 58 | /* External variables --------------------------------------------------------*/ 59 | extern DMA_HandleTypeDef hdma_memtomem_dma2_stream0; 60 | extern DMA2D_HandleTypeDef hdma2d; 61 | extern DSI_HandleTypeDef hdsi; 62 | extern LTDC_HandleTypeDef hltdc; 63 | /* USER CODE BEGIN EV */ 64 | 65 | /* USER CODE END EV */ 66 | 67 | /******************************************************************************/ 68 | /* Cortex-M4 Processor Interruption and Exception Handlers */ 69 | /******************************************************************************/ 70 | /** 71 | * @brief This function handles Non maskable interrupt. 72 | */ 73 | void NMI_Handler(void) 74 | { 75 | /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ 76 | 77 | /* USER CODE END NonMaskableInt_IRQn 0 */ 78 | /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ 79 | while (1) 80 | { 81 | } 82 | /* USER CODE END NonMaskableInt_IRQn 1 */ 83 | } 84 | 85 | /** 86 | * @brief This function handles Hard fault interrupt. 87 | */ 88 | void HardFault_Handler(void) 89 | { 90 | /* USER CODE BEGIN HardFault_IRQn 0 */ 91 | 92 | /* USER CODE END HardFault_IRQn 0 */ 93 | while (1) 94 | { 95 | /* USER CODE BEGIN W1_HardFault_IRQn 0 */ 96 | /* USER CODE END W1_HardFault_IRQn 0 */ 97 | } 98 | } 99 | 100 | /** 101 | * @brief This function handles Memory management fault. 102 | */ 103 | void MemManage_Handler(void) 104 | { 105 | /* USER CODE BEGIN MemoryManagement_IRQn 0 */ 106 | 107 | /* USER CODE END MemoryManagement_IRQn 0 */ 108 | while (1) 109 | { 110 | /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ 111 | /* USER CODE END W1_MemoryManagement_IRQn 0 */ 112 | } 113 | } 114 | 115 | /** 116 | * @brief This function handles Pre-fetch fault, memory access fault. 117 | */ 118 | void BusFault_Handler(void) 119 | { 120 | /* USER CODE BEGIN BusFault_IRQn 0 */ 121 | 122 | /* USER CODE END BusFault_IRQn 0 */ 123 | while (1) 124 | { 125 | /* USER CODE BEGIN W1_BusFault_IRQn 0 */ 126 | /* USER CODE END W1_BusFault_IRQn 0 */ 127 | } 128 | } 129 | 130 | /** 131 | * @brief This function handles Undefined instruction or illegal state. 132 | */ 133 | void UsageFault_Handler(void) 134 | { 135 | /* USER CODE BEGIN UsageFault_IRQn 0 */ 136 | 137 | /* USER CODE END UsageFault_IRQn 0 */ 138 | while (1) 139 | { 140 | /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ 141 | /* USER CODE END W1_UsageFault_IRQn 0 */ 142 | } 143 | } 144 | 145 | /** 146 | * @brief This function handles System service call via SWI instruction. 147 | */ 148 | void SVC_Handler(void) 149 | { 150 | /* USER CODE BEGIN SVCall_IRQn 0 */ 151 | 152 | /* USER CODE END SVCall_IRQn 0 */ 153 | /* USER CODE BEGIN SVCall_IRQn 1 */ 154 | 155 | /* USER CODE END SVCall_IRQn 1 */ 156 | } 157 | 158 | /** 159 | * @brief This function handles Debug monitor. 160 | */ 161 | void DebugMon_Handler(void) 162 | { 163 | /* USER CODE BEGIN DebugMonitor_IRQn 0 */ 164 | 165 | /* USER CODE END DebugMonitor_IRQn 0 */ 166 | /* USER CODE BEGIN DebugMonitor_IRQn 1 */ 167 | 168 | /* USER CODE END DebugMonitor_IRQn 1 */ 169 | } 170 | 171 | /** 172 | * @brief This function handles Pendable request for system service. 173 | */ 174 | void PendSV_Handler(void) 175 | { 176 | /* USER CODE BEGIN PendSV_IRQn 0 */ 177 | 178 | /* USER CODE END PendSV_IRQn 0 */ 179 | /* USER CODE BEGIN PendSV_IRQn 1 */ 180 | 181 | /* USER CODE END PendSV_IRQn 1 */ 182 | } 183 | 184 | /** 185 | * @brief This function handles System tick timer. 186 | */ 187 | void SysTick_Handler(void) 188 | { 189 | /* USER CODE BEGIN SysTick_IRQn 0 */ 190 | 191 | /* USER CODE END SysTick_IRQn 0 */ 192 | HAL_IncTick(); 193 | /* USER CODE BEGIN SysTick_IRQn 1 */ 194 | 195 | /* USER CODE END SysTick_IRQn 1 */ 196 | } 197 | 198 | /******************************************************************************/ 199 | /* STM32F4xx Peripheral Interrupt Handlers */ 200 | /* Add here the Interrupt Handlers for the used peripherals. */ 201 | /* For the available peripheral interrupt handler names, */ 202 | /* please refer to the startup file (startup_stm32f4xx.s). */ 203 | /******************************************************************************/ 204 | 205 | /** 206 | * @brief This function handles DMA2 stream0 global interrupt. 207 | */ 208 | void DMA2_Stream0_IRQHandler(void) 209 | { 210 | /* USER CODE BEGIN DMA2_Stream0_IRQn 0 */ 211 | 212 | /* USER CODE END DMA2_Stream0_IRQn 0 */ 213 | HAL_DMA_IRQHandler(&hdma_memtomem_dma2_stream0); 214 | /* USER CODE BEGIN DMA2_Stream0_IRQn 1 */ 215 | 216 | /* USER CODE END DMA2_Stream0_IRQn 1 */ 217 | } 218 | 219 | /** 220 | * @brief This function handles LTDC global interrupt. 221 | */ 222 | void LTDC_IRQHandler(void) 223 | { 224 | /* USER CODE BEGIN LTDC_IRQn 0 */ 225 | 226 | /* USER CODE END LTDC_IRQn 0 */ 227 | HAL_LTDC_IRQHandler(&hltdc); 228 | /* USER CODE BEGIN LTDC_IRQn 1 */ 229 | 230 | /* USER CODE END LTDC_IRQn 1 */ 231 | } 232 | 233 | /** 234 | * @brief This function handles DMA2D global interrupt. 235 | */ 236 | void DMA2D_IRQHandler(void) 237 | { 238 | /* USER CODE BEGIN DMA2D_IRQn 0 */ 239 | 240 | /* USER CODE END DMA2D_IRQn 0 */ 241 | HAL_DMA2D_IRQHandler(&hdma2d); 242 | /* USER CODE BEGIN DMA2D_IRQn 1 */ 243 | 244 | /* USER CODE END DMA2D_IRQn 1 */ 245 | } 246 | 247 | /** 248 | * @brief This function handles DSI global interrupt. 249 | */ 250 | void DSI_IRQHandler(void) 251 | { 252 | /* USER CODE BEGIN DSI_IRQn 0 */ 253 | 254 | /* USER CODE END DSI_IRQn 0 */ 255 | HAL_DSI_IRQHandler(&hdsi); 256 | /* USER CODE BEGIN DSI_IRQn 1 */ 257 | 258 | /* USER CODE END DSI_IRQn 1 */ 259 | } 260 | 261 | /* USER CODE BEGIN 1 */ 262 | 263 | /* USER CODE END 1 */ 264 | -------------------------------------------------------------------------------- /Core/Src/syscalls.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file syscalls.c 4 | * @author Auto-generated by STM32CubeIDE 5 | * @brief STM32CubeIDE Minimal System calls file 6 | * 7 | * For more information about which c-functions 8 | * need which of these lowlevel functions 9 | * please consult the Newlib libc-manual 10 | ****************************************************************************** 11 | * @attention 12 | * 13 | * Copyright (c) 2020-2022 STMicroelectronics. 14 | * All rights reserved. 15 | * 16 | * This software is licensed under terms that can be found in the LICENSE file 17 | * in the root directory of this software component. 18 | * If no LICENSE file comes with this software, it is provided AS-IS. 19 | * 20 | ****************************************************************************** 21 | */ 22 | 23 | /* Includes */ 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | 34 | /* Variables */ 35 | extern int __io_putchar(int ch) __attribute__((weak)); 36 | extern int __io_getchar(void) __attribute__((weak)); 37 | 38 | 39 | char *__env[1] = { 0 }; 40 | char **environ = __env; 41 | 42 | 43 | /* Functions */ 44 | void initialise_monitor_handles() 45 | { 46 | } 47 | 48 | int _getpid(void) 49 | { 50 | return 1; 51 | } 52 | 53 | int _kill(int pid, int sig) 54 | { 55 | (void)pid; 56 | (void)sig; 57 | errno = EINVAL; 58 | return -1; 59 | } 60 | 61 | void _exit (int status) 62 | { 63 | _kill(status, -1); 64 | while (1) {} /* Make sure we hang here */ 65 | } 66 | 67 | __attribute__((weak)) int _read(int file, char *ptr, int len) 68 | { 69 | (void)file; 70 | int DataIdx; 71 | 72 | for (DataIdx = 0; DataIdx < len; DataIdx++) 73 | { 74 | *ptr++ = __io_getchar(); 75 | } 76 | 77 | return len; 78 | } 79 | 80 | __attribute__((weak)) int _write(int file, char *ptr, int len) 81 | { 82 | (void)file; 83 | int DataIdx; 84 | 85 | for (DataIdx = 0; DataIdx < len; DataIdx++) 86 | { 87 | __io_putchar(*ptr++); 88 | } 89 | return len; 90 | } 91 | 92 | int _close(int file) 93 | { 94 | (void)file; 95 | return -1; 96 | } 97 | 98 | 99 | int _fstat(int file, struct stat *st) 100 | { 101 | (void)file; 102 | st->st_mode = S_IFCHR; 103 | return 0; 104 | } 105 | 106 | int _isatty(int file) 107 | { 108 | (void)file; 109 | return 1; 110 | } 111 | 112 | int _lseek(int file, int ptr, int dir) 113 | { 114 | (void)file; 115 | (void)ptr; 116 | (void)dir; 117 | return 0; 118 | } 119 | 120 | int _open(char *path, int flags, ...) 121 | { 122 | (void)path; 123 | (void)flags; 124 | /* Pretend like we always fail */ 125 | return -1; 126 | } 127 | 128 | int _wait(int *status) 129 | { 130 | (void)status; 131 | errno = ECHILD; 132 | return -1; 133 | } 134 | 135 | int _unlink(char *name) 136 | { 137 | (void)name; 138 | errno = ENOENT; 139 | return -1; 140 | } 141 | 142 | int _times(struct tms *buf) 143 | { 144 | (void)buf; 145 | return -1; 146 | } 147 | 148 | int _stat(char *file, struct stat *st) 149 | { 150 | (void)file; 151 | st->st_mode = S_IFCHR; 152 | return 0; 153 | } 154 | 155 | int _link(char *old, char *new) 156 | { 157 | (void)old; 158 | (void)new; 159 | errno = EMLINK; 160 | return -1; 161 | } 162 | 163 | int _fork(void) 164 | { 165 | errno = EAGAIN; 166 | return -1; 167 | } 168 | 169 | int _execve(char *name, char **argv, char **env) 170 | { 171 | (void)name; 172 | (void)argv; 173 | (void)env; 174 | errno = ENOMEM; 175 | return -1; 176 | } 177 | -------------------------------------------------------------------------------- /Core/Src/sysmem.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file sysmem.c 4 | * @author Generated by STM32CubeIDE 5 | * @brief STM32CubeIDE System Memory calls file 6 | * 7 | * For more information about which C functions 8 | * need which of these lowlevel functions 9 | * please consult the newlib libc manual 10 | ****************************************************************************** 11 | * @attention 12 | * 13 | * Copyright (c) 2022 STMicroelectronics. 14 | * All rights reserved. 15 | * 16 | * This software is licensed under terms that can be found in the LICENSE file 17 | * in the root directory of this software component. 18 | * If no LICENSE file comes with this software, it is provided AS-IS. 19 | * 20 | ****************************************************************************** 21 | */ 22 | 23 | /* Includes */ 24 | #include 25 | #include 26 | 27 | /** 28 | * Pointer to the current high watermark of the heap usage 29 | */ 30 | static uint8_t *__sbrk_heap_end = NULL; 31 | 32 | /** 33 | * @brief _sbrk() allocates memory to the newlib heap and is used by malloc 34 | * and others from the C library 35 | * 36 | * @verbatim 37 | * ############################################################################ 38 | * # .data # .bss # newlib heap # MSP stack # 39 | * # # # # Reserved by _Min_Stack_Size # 40 | * ############################################################################ 41 | * ^-- RAM start ^-- _end _estack, RAM end --^ 42 | * @endverbatim 43 | * 44 | * This implementation starts allocating at the '_end' linker symbol 45 | * The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack 46 | * The implementation considers '_estack' linker symbol to be RAM end 47 | * NOTE: If the MSP stack, at any point during execution, grows larger than the 48 | * reserved size, please increase the '_Min_Stack_Size'. 49 | * 50 | * @param incr Memory size 51 | * @return Pointer to allocated memory 52 | */ 53 | void *_sbrk(ptrdiff_t incr) 54 | { 55 | extern uint8_t _end; /* Symbol defined in the linker script */ 56 | extern uint8_t _estack; /* Symbol defined in the linker script */ 57 | extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */ 58 | const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size; 59 | const uint8_t *max_heap = (uint8_t *)stack_limit; 60 | uint8_t *prev_heap_end; 61 | 62 | /* Initialize heap end at first call */ 63 | if (NULL == __sbrk_heap_end) 64 | { 65 | __sbrk_heap_end = &_end; 66 | } 67 | 68 | /* Protect heap from growing into the reserved MSP stack */ 69 | if (__sbrk_heap_end + incr > max_heap) 70 | { 71 | errno = ENOMEM; 72 | return (void *)-1; 73 | } 74 | 75 | prev_heap_end = __sbrk_heap_end; 76 | __sbrk_heap_end += incr; 77 | 78 | return (void *)prev_heap_end; 79 | } 80 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/accelero.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file accelero.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This header file contains the functions prototypes for the Accelerometer driver. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2015 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ 39 | #ifndef __ACCELERO_H 40 | #define __ACCELERO_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /* Includes ------------------------------------------------------------------*/ 47 | #include 48 | 49 | /** @addtogroup BSP 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup Components 54 | * @{ 55 | */ 56 | 57 | /** @addtogroup ACCELERO 58 | * @{ 59 | */ 60 | 61 | /** @defgroup ACCELERO_Exported_Types 62 | * @{ 63 | */ 64 | 65 | /** @defgroup ACCELERO_Driver_structure Accelerometer Driver structure 66 | * @{ 67 | */ 68 | typedef struct 69 | { 70 | void (*Init)(uint16_t); 71 | void (*DeInit)(void); 72 | uint8_t (*ReadID)(void); 73 | void (*Reset)(void); 74 | void (*LowPower)(void); 75 | void (*ConfigIT)(void); 76 | void (*EnableIT)(uint8_t); 77 | void (*DisableIT)(uint8_t); 78 | uint8_t (*ITStatus)(uint16_t); 79 | void (*ClearIT)(void); 80 | void (*FilterConfig)(uint8_t); 81 | void (*FilterCmd)(uint8_t); 82 | void (*GetXYZ)(int16_t *); 83 | }ACCELERO_DrvTypeDef; 84 | /** 85 | * @} 86 | */ 87 | 88 | /** @defgroup ACCELERO_Configuration_structure Accelerometer Configuration structure 89 | * @{ 90 | */ 91 | 92 | /* ACCELERO struct */ 93 | typedef struct 94 | { 95 | uint8_t Power_Mode; /* Power-down/Normal Mode */ 96 | uint8_t AccOutput_DataRate; /* OUT data rate */ 97 | uint8_t Axes_Enable; /* Axes enable */ 98 | uint8_t High_Resolution; /* High Resolution enabling/disabling */ 99 | uint8_t BlockData_Update; /* Block Data Update */ 100 | uint8_t Endianness; /* Endian Data selection */ 101 | uint8_t AccFull_Scale; /* Full Scale selection */ 102 | uint8_t Communication_Mode; 103 | }ACCELERO_InitTypeDef; 104 | 105 | /* ACCELERO High Pass Filter struct */ 106 | typedef struct 107 | { 108 | uint8_t HighPassFilter_Mode_Selection; /* Internal filter mode */ 109 | uint8_t HighPassFilter_CutOff_Frequency; /* High pass filter cut-off frequency */ 110 | uint8_t HighPassFilter_AOI1; /* HPF_enabling/disabling for AOI function on interrupt 1 */ 111 | uint8_t HighPassFilter_AOI2; /* HPF_enabling/disabling for AOI function on interrupt 2 */ 112 | uint8_t HighPassFilter_Data_Sel; 113 | uint8_t HighPassFilter_Stat; 114 | }ACCELERO_FilterConfigTypeDef; 115 | 116 | /** 117 | * @} 118 | */ 119 | 120 | 121 | /** 122 | * @} 123 | */ 124 | 125 | /** 126 | * @} 127 | */ 128 | 129 | /** 130 | * @} 131 | */ 132 | 133 | /** 134 | * @} 135 | */ 136 | 137 | #ifdef __cplusplus 138 | } 139 | #endif 140 | 141 | #endif /* __ACCELERO_H */ 142 | 143 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 144 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/audio.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file audio.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This header file contains the common defines and functions prototypes 8 | * for the Audio driver. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT(c) 2015 STMicroelectronics

13 | * 14 | * Redistribution and use in source and binary forms, with or without modification, 15 | * are permitted provided that the following conditions are met: 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 22 | * may be used to endorse or promote products derived from this software 23 | * without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | * 36 | ****************************************************************************** 37 | */ 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __AUDIO_H 41 | #define __AUDIO_H 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /* Includes ------------------------------------------------------------------*/ 48 | #include 49 | 50 | /** @addtogroup BSP 51 | * @{ 52 | */ 53 | 54 | /** @addtogroup Components 55 | * @{ 56 | */ 57 | 58 | /** @addtogroup AUDIO 59 | * @{ 60 | */ 61 | 62 | /** @defgroup AUDIO_Exported_Constants 63 | * @{ 64 | */ 65 | 66 | /* Codec audio Standards */ 67 | #define CODEC_STANDARD 0x04 68 | #define I2S_STANDARD I2S_STANDARD_PHILIPS 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | /** @defgroup AUDIO_Exported_Types 75 | * @{ 76 | */ 77 | 78 | /** @defgroup AUDIO_Driver_structure Audio Driver structure 79 | * @{ 80 | */ 81 | typedef struct 82 | { 83 | uint32_t (*Init)(uint16_t, uint16_t, uint8_t, uint32_t); 84 | void (*DeInit)(void); 85 | uint32_t (*ReadID)(uint16_t); 86 | uint32_t (*Play)(uint16_t, uint16_t*, uint16_t); 87 | uint32_t (*Pause)(uint16_t); 88 | uint32_t (*Resume)(uint16_t); 89 | uint32_t (*Stop)(uint16_t, uint32_t); 90 | uint32_t (*SetFrequency)(uint16_t, uint32_t); 91 | uint32_t (*SetVolume)(uint16_t, uint8_t); 92 | uint32_t (*SetMute)(uint16_t, uint32_t); 93 | uint32_t (*SetOutputMode)(uint16_t, uint8_t); 94 | uint32_t (*Reset)(uint16_t); 95 | }AUDIO_DrvTypeDef; 96 | /** 97 | * @} 98 | */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | /** 105 | * @} 106 | */ 107 | 108 | /** 109 | * @} 110 | */ 111 | 112 | /** 113 | * @} 114 | */ 115 | 116 | #ifdef __cplusplus 117 | } 118 | #endif 119 | 120 | #endif /* __AUDIO_H */ 121 | 122 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 123 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/camera.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file camera.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This header file contains the common defines and functions prototypes 8 | * for the camera driver. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT(c) 2015 STMicroelectronics

13 | * 14 | * Redistribution and use in source and binary forms, with or without modification, 15 | * are permitted provided that the following conditions are met: 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 22 | * may be used to endorse or promote products derived from this software 23 | * without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | * 36 | ****************************************************************************** 37 | */ 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __CAMERA_H 41 | #define __CAMERA_H 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /* Includes ------------------------------------------------------------------*/ 48 | #include 49 | 50 | /** @addtogroup BSP 51 | * @{ 52 | */ 53 | 54 | /** @addtogroup Components 55 | * @{ 56 | */ 57 | 58 | /** @addtogroup CAMERA 59 | * @{ 60 | */ 61 | 62 | 63 | /** @defgroup CAMERA_Exported_Types 64 | * @{ 65 | */ 66 | 67 | /** @defgroup CAMERA_Driver_structure Camera Driver structure 68 | * @{ 69 | */ 70 | typedef struct 71 | { 72 | void (*Init)(uint16_t, uint32_t); 73 | uint16_t (*ReadID)(uint16_t); 74 | void (*Config)(uint16_t, uint32_t, uint32_t, uint32_t); 75 | }CAMERA_DrvTypeDef; 76 | /** 77 | * @} 78 | */ 79 | 80 | /** 81 | * @} 82 | */ 83 | 84 | /** @defgroup CAMERA_Exported_Constants 85 | * @{ 86 | */ 87 | #define CAMERA_R160x120 0x00 /* QQVGA Resolution */ 88 | #define CAMERA_R320x240 0x01 /* QVGA Resolution */ 89 | #define CAMERA_R480x272 0x02 /* 480x272 Resolution */ 90 | #define CAMERA_R640x480 0x03 /* VGA Resolution */ 91 | 92 | #define CAMERA_CONTRAST_BRIGHTNESS 0x00 /* Camera contrast brightness features */ 93 | #define CAMERA_BLACK_WHITE 0x01 /* Camera black white feature */ 94 | #define CAMERA_COLOR_EFFECT 0x03 /* Camera color effect feature */ 95 | 96 | #define CAMERA_BRIGHTNESS_LEVEL0 0x00 /* Brightness level -2 */ 97 | #define CAMERA_BRIGHTNESS_LEVEL1 0x01 /* Brightness level -1 */ 98 | #define CAMERA_BRIGHTNESS_LEVEL2 0x02 /* Brightness level 0 */ 99 | #define CAMERA_BRIGHTNESS_LEVEL3 0x03 /* Brightness level +1 */ 100 | #define CAMERA_BRIGHTNESS_LEVEL4 0x04 /* Brightness level +2 */ 101 | 102 | #define CAMERA_CONTRAST_LEVEL0 0x05 /* Contrast level -2 */ 103 | #define CAMERA_CONTRAST_LEVEL1 0x06 /* Contrast level -1 */ 104 | #define CAMERA_CONTRAST_LEVEL2 0x07 /* Contrast level 0 */ 105 | #define CAMERA_CONTRAST_LEVEL3 0x08 /* Contrast level +1 */ 106 | #define CAMERA_CONTRAST_LEVEL4 0x09 /* Contrast level +2 */ 107 | 108 | #define CAMERA_BLACK_WHITE_BW 0x00 /* Black and white effect */ 109 | #define CAMERA_BLACK_WHITE_NEGATIVE 0x01 /* Negative effect */ 110 | #define CAMERA_BLACK_WHITE_BW_NEGATIVE 0x02 /* BW and Negative effect */ 111 | #define CAMERA_BLACK_WHITE_NORMAL 0x03 /* Normal effect */ 112 | 113 | #define CAMERA_COLOR_EFFECT_NONE 0x00 /* No effects */ 114 | #define CAMERA_COLOR_EFFECT_BLUE 0x01 /* Blue effect */ 115 | #define CAMERA_COLOR_EFFECT_GREEN 0x02 /* Green effect */ 116 | #define CAMERA_COLOR_EFFECT_RED 0x03 /* Red effect */ 117 | #define CAMERA_COLOR_EFFECT_ANTIQUE 0x04 /* Antique effect */ 118 | 119 | /** 120 | * @} 121 | */ 122 | 123 | /** 124 | * @} 125 | */ 126 | 127 | /** 128 | * @} 129 | */ 130 | 131 | /** 132 | * @} 133 | */ 134 | 135 | #ifdef __cplusplus 136 | } 137 | #endif 138 | 139 | #endif /* __CAMERA_H */ 140 | 141 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 142 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/epd.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file epd.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This file contains all the functions prototypes for the 8 | * EPD (E Paper Display) driver. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT(c) 2015 STMicroelectronics

13 | * 14 | * Redistribution and use in source and binary forms, with or without modification, 15 | * are permitted provided that the following conditions are met: 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 22 | * may be used to endorse or promote products derived from this software 23 | * without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | * 36 | ****************************************************************************** 37 | */ 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __EPD_H 41 | #define __EPD_H 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /* Includes ------------------------------------------------------------------*/ 48 | #include 49 | 50 | /** @addtogroup BSP 51 | * @{ 52 | */ 53 | 54 | /** @addtogroup Components 55 | * @{ 56 | */ 57 | 58 | /** @addtogroup Common 59 | * @{ 60 | */ 61 | 62 | /** @addtogroup EPD 63 | * @{ 64 | */ 65 | 66 | /** @defgroup EPD_Exported_Types 67 | * @{ 68 | */ 69 | 70 | /** @defgroup EPD_Driver_structure E Paper Display Driver structure 71 | * @{ 72 | */ 73 | typedef struct 74 | { 75 | void (*Init)(void); 76 | void (*WritePixel)(uint8_t); 77 | 78 | /* Optimized operation */ 79 | void (*SetDisplayWindow)(uint16_t, uint16_t, uint16_t, uint16_t); 80 | void (*RefreshDisplay)(void); 81 | void (*CloseChargePump)(void); 82 | 83 | uint16_t (*GetEpdPixelWidth)(void); 84 | uint16_t (*GetEpdPixelHeight)(void); 85 | void (*DrawImage)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t*); 86 | } 87 | EPD_DrvTypeDef; 88 | /** 89 | * @} 90 | */ 91 | 92 | /** 93 | * @} 94 | */ 95 | 96 | /** 97 | * @} 98 | */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | /** 105 | * @} 106 | */ 107 | 108 | 109 | #ifdef __cplusplus 110 | } 111 | #endif 112 | 113 | #endif /* EPD_H */ 114 | 115 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 116 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/gyro.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file gyro.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This header file contains the functions prototypes for the gyroscope driver. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2015 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __GYRO_H 41 | #define __GYRO_H 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /* Includes ------------------------------------------------------------------*/ 48 | #include 49 | 50 | /** @addtogroup BSP 51 | * @{ 52 | */ 53 | 54 | /** @addtogroup Components 55 | * @{ 56 | */ 57 | 58 | /** @addtogroup GYRO 59 | * @{ 60 | */ 61 | 62 | /** @defgroup GYRO_Exported_Types 63 | * @{ 64 | */ 65 | 66 | /** @defgroup GYRO_Driver_structure Gyroscope Driver structure 67 | * @{ 68 | */ 69 | typedef struct 70 | { 71 | void (*Init)(uint16_t); 72 | void (*DeInit)(void); 73 | uint8_t (*ReadID)(void); 74 | void (*Reset)(void); 75 | void (*LowPower)(uint16_t); 76 | void (*ConfigIT)(uint16_t); 77 | void (*EnableIT)(uint8_t); 78 | void (*DisableIT)(uint8_t); 79 | uint8_t (*ITStatus)(uint16_t, uint16_t); 80 | void (*ClearIT)(uint16_t, uint16_t); 81 | void (*FilterConfig)(uint8_t); 82 | void (*FilterCmd)(uint8_t); 83 | void (*GetXYZ)(float *); 84 | }GYRO_DrvTypeDef; 85 | /** 86 | * @} 87 | */ 88 | 89 | /** @defgroup GYRO_Config_structure Gyroscope Configuration structure 90 | * @{ 91 | */ 92 | 93 | typedef struct 94 | { 95 | uint8_t Power_Mode; /* Power-down/Sleep/Normal Mode */ 96 | uint8_t Output_DataRate; /* OUT data rate */ 97 | uint8_t Axes_Enable; /* Axes enable */ 98 | uint8_t Band_Width; /* Bandwidth selection */ 99 | uint8_t BlockData_Update; /* Block Data Update */ 100 | uint8_t Endianness; /* Endian Data selection */ 101 | uint8_t Full_Scale; /* Full Scale selection */ 102 | }GYRO_InitTypeDef; 103 | 104 | /* GYRO High Pass Filter struct */ 105 | typedef struct 106 | { 107 | uint8_t HighPassFilter_Mode_Selection; /* Internal filter mode */ 108 | uint8_t HighPassFilter_CutOff_Frequency; /* High pass filter cut-off frequency */ 109 | }GYRO_FilterConfigTypeDef; 110 | 111 | /*GYRO Interrupt struct */ 112 | typedef struct 113 | { 114 | uint8_t Latch_Request; /* Latch interrupt request into CLICK_SRC register */ 115 | uint8_t Interrupt_Axes; /* X, Y, Z Axes Interrupts */ 116 | uint8_t Interrupt_ActiveEdge; /* Interrupt Active edge */ 117 | }GYRO_InterruptConfigTypeDef; 118 | 119 | /** 120 | * @} 121 | */ 122 | 123 | /** 124 | * @} 125 | */ 126 | 127 | /** 128 | * @} 129 | */ 130 | 131 | /** 132 | * @} 133 | */ 134 | 135 | /** 136 | * @} 137 | */ 138 | 139 | #ifdef __cplusplus 140 | } 141 | #endif 142 | 143 | #endif /* __GYRO_H */ 144 | 145 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 146 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/idd.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file idd.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This file contains all the functions prototypes for the IDD driver. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2015 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ 39 | #ifndef __IDD_H 40 | #define __IDD_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /* Includes ------------------------------------------------------------------*/ 47 | #include 48 | 49 | /** @addtogroup BSP 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup Components 54 | * @{ 55 | */ 56 | 57 | /** @addtogroup IDD 58 | * @{ 59 | */ 60 | 61 | /** @defgroup IDD_Exported_Types IDD Exported Types 62 | * @{ 63 | */ 64 | 65 | /** @defgroup IDD_Config_structure IDD Configuration structure 66 | * @{ 67 | */ 68 | typedef struct 69 | { 70 | uint16_t AmpliGain; /*!< Specifies ampli gain value 71 | */ 72 | uint16_t VddMin; /*!< Specifies minimum MCU VDD can reach to protect MCU from reset 73 | */ 74 | uint16_t Shunt0Value; /*!< Specifies value of Shunt 0 if existing 75 | */ 76 | uint16_t Shunt1Value; /*!< Specifies value of Shunt 1 if existing 77 | */ 78 | uint16_t Shunt2Value; /*!< Specifies value of Shunt 2 if existing 79 | */ 80 | uint16_t Shunt3Value; /*!< Specifies value of Shunt 3 if existing 81 | */ 82 | uint16_t Shunt4Value; /*!< Specifies value of Shunt 4 if existing 83 | */ 84 | uint16_t Shunt0StabDelay; /*!< Specifies delay of Shunt 0 stabilization if existing 85 | */ 86 | uint16_t Shunt1StabDelay; /*!< Specifies delay of Shunt 1 stabilization if existing 87 | */ 88 | uint16_t Shunt2StabDelay; /*!< Specifies delay of Shunt 2 stabilization if existing 89 | */ 90 | uint16_t Shunt3StabDelay; /*!< Specifies delay of Shunt 3 stabilization if existing 91 | */ 92 | uint16_t Shunt4StabDelay; /*!< Specifies delay of Shunt 4 stabilization if existing 93 | */ 94 | uint8_t ShuntNbOnBoard; /*!< Specifies number of shunts that are present on board 95 | This parameter can be a value of @ref IDD_shunt_number */ 96 | uint8_t ShuntNbUsed; /*!< Specifies number of shunts used for measurement 97 | This parameter can be a value of @ref IDD_shunt_number */ 98 | uint8_t VrefMeasurement; /*!< Specifies if Vref is automatically measured before each Idd measurement 99 | This parameter can be a value of @ref IDD_Vref_Measurement */ 100 | uint8_t Calibration; /*!< Specifies if calibration is done before each Idd measurement 101 | */ 102 | uint8_t PreDelayUnit; /*!< Specifies Pre delay unit 103 | This parameter can be a value of @ref IDD_PreDelay */ 104 | uint8_t PreDelayValue; /*!< Specifies Pre delay value in selected unit 105 | */ 106 | uint8_t MeasureNb; /*!< Specifies number of Measure to be performed 107 | This parameter can be a value between 1 and 256 */ 108 | uint8_t DeltaDelayUnit; /*!< Specifies Delta delay unit 109 | This parameter can be a value of @ref IDD_DeltaDelay */ 110 | uint8_t DeltaDelayValue; /*!< Specifies Delta delay between 2 measures 111 | value can be between 1 and 128 */ 112 | }IDD_ConfigTypeDef; 113 | /** 114 | * @} 115 | */ 116 | 117 | /** @defgroup IDD_Driver_structure IDD Driver structure 118 | * @{ 119 | */ 120 | typedef struct 121 | { 122 | void (*Init)(uint16_t); 123 | void (*DeInit)(uint16_t); 124 | uint16_t (*ReadID)(uint16_t); 125 | void (*Reset)(uint16_t); 126 | void (*LowPower)(uint16_t); 127 | void (*WakeUp)(uint16_t); 128 | void (*Start)(uint16_t); 129 | void (*Config)(uint16_t,IDD_ConfigTypeDef); 130 | void (*GetValue)(uint16_t, uint32_t *); 131 | void (*EnableIT)(uint16_t); 132 | void (*ClearIT)(uint16_t); 133 | uint8_t (*GetITStatus)(uint16_t); 134 | void (*DisableIT)(uint16_t); 135 | void (*ErrorEnableIT)(uint16_t); 136 | void (*ErrorClearIT)(uint16_t); 137 | uint8_t (*ErrorGetITStatus)(uint16_t); 138 | void (*ErrorDisableIT)(uint16_t); 139 | uint8_t (*ErrorGetSrc)(uint16_t); 140 | uint8_t (*ErrorGetCode)(uint16_t); 141 | }IDD_DrvTypeDef; 142 | /** 143 | * @} 144 | */ 145 | 146 | /** 147 | * @} 148 | */ 149 | 150 | /** 151 | * @} 152 | */ 153 | 154 | /** 155 | * @} 156 | */ 157 | 158 | /** 159 | * @} 160 | */ 161 | 162 | #ifdef __cplusplus 163 | } 164 | #endif 165 | 166 | #endif /* __IDD_H */ 167 | 168 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 169 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/io.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file io.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This file contains all the functions prototypes for the IO driver. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2015 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ 39 | #ifndef __IO_H 40 | #define __IO_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /* Includes ------------------------------------------------------------------*/ 47 | #include 48 | 49 | /** @addtogroup BSP 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup Components 54 | * @{ 55 | */ 56 | 57 | /** @addtogroup IO 58 | * @{ 59 | */ 60 | 61 | /** @defgroup IO_Exported_Types 62 | * @{ 63 | */ 64 | 65 | /** 66 | * @brief IO Bit SET and Bit RESET enumeration 67 | */ 68 | typedef enum 69 | { 70 | IO_PIN_RESET = 0, 71 | IO_PIN_SET 72 | }IO_PinState; 73 | 74 | typedef enum 75 | { 76 | IO_MODE_INPUT = 0, /* input floating */ 77 | IO_MODE_OUTPUT, /* output Push Pull */ 78 | IO_MODE_IT_RISING_EDGE, /* float input - irq detect on rising edge */ 79 | IO_MODE_IT_FALLING_EDGE, /* float input - irq detect on falling edge */ 80 | IO_MODE_IT_LOW_LEVEL, /* float input - irq detect on low level */ 81 | IO_MODE_IT_HIGH_LEVEL, /* float input - irq detect on high level */ 82 | /* following modes only available on MFX*/ 83 | IO_MODE_ANALOG, /* analog mode */ 84 | IO_MODE_OFF, /* when pin isn't used*/ 85 | IO_MODE_INPUT_PU, /* input with internal pull up resistor */ 86 | IO_MODE_INPUT_PD, /* input with internal pull down resistor */ 87 | IO_MODE_OUTPUT_OD, /* Open Drain output without internal resistor */ 88 | IO_MODE_OUTPUT_OD_PU, /* Open Drain output with internal pullup resistor */ 89 | IO_MODE_OUTPUT_OD_PD, /* Open Drain output with internal pulldown resistor */ 90 | IO_MODE_OUTPUT_PP, /* PushPull output without internal resistor */ 91 | IO_MODE_OUTPUT_PP_PU, /* PushPull output with internal pullup resistor */ 92 | IO_MODE_OUTPUT_PP_PD, /* PushPull output with internal pulldown resistor */ 93 | IO_MODE_IT_RISING_EDGE_PU, /* push up resistor input - irq on rising edge */ 94 | IO_MODE_IT_RISING_EDGE_PD, /* push dw resistor input - irq on rising edge */ 95 | IO_MODE_IT_FALLING_EDGE_PU, /* push up resistor input - irq on falling edge */ 96 | IO_MODE_IT_FALLING_EDGE_PD, /* push dw resistor input - irq on falling edge */ 97 | IO_MODE_IT_LOW_LEVEL_PU, /* push up resistor input - irq detect on low level */ 98 | IO_MODE_IT_LOW_LEVEL_PD, /* push dw resistor input - irq detect on low level */ 99 | IO_MODE_IT_HIGH_LEVEL_PU, /* push up resistor input - irq detect on high level */ 100 | IO_MODE_IT_HIGH_LEVEL_PD, /* push dw resistor input - irq detect on high level */ 101 | 102 | }IO_ModeTypedef; 103 | 104 | /** @defgroup IO_Driver_structure IO Driver structure 105 | * @{ 106 | */ 107 | typedef struct 108 | { 109 | void (*Init)(uint16_t); 110 | uint16_t (*ReadID)(uint16_t); 111 | void (*Reset)(uint16_t); 112 | 113 | void (*Start)(uint16_t, uint32_t); 114 | uint8_t (*Config)(uint16_t, uint32_t, IO_ModeTypedef); 115 | void (*WritePin)(uint16_t, uint32_t, uint8_t); 116 | uint32_t (*ReadPin)(uint16_t, uint32_t); 117 | 118 | void (*EnableIT)(uint16_t); 119 | void (*DisableIT)(uint16_t); 120 | uint32_t (*ITStatus)(uint16_t, uint32_t); 121 | void (*ClearIT)(uint16_t, uint32_t); 122 | 123 | }IO_DrvTypeDef; 124 | /** 125 | * @} 126 | */ 127 | 128 | /** 129 | * @} 130 | */ 131 | 132 | /** 133 | * @} 134 | */ 135 | 136 | /** 137 | * @} 138 | */ 139 | 140 | /** 141 | * @} 142 | */ 143 | 144 | #ifdef __cplusplus 145 | } 146 | #endif 147 | 148 | #endif /* __IO_H */ 149 | 150 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 151 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/lcd.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file lcd.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This file contains all the functions prototypes for the LCD driver. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2015 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ 39 | #ifndef __LCD_H 40 | #define __LCD_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /* Includes ------------------------------------------------------------------*/ 47 | #include 48 | 49 | /** @addtogroup BSP 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup Components 54 | * @{ 55 | */ 56 | 57 | /** @addtogroup LCD 58 | * @{ 59 | */ 60 | 61 | /** @defgroup LCD_Exported_Types 62 | * @{ 63 | */ 64 | 65 | /** @defgroup LCD_Driver_structure LCD Driver structure 66 | * @{ 67 | */ 68 | typedef struct 69 | { 70 | void (*Init)(void); 71 | uint16_t (*ReadID)(void); 72 | void (*DisplayOn)(void); 73 | void (*DisplayOff)(void); 74 | void (*SetCursor)(uint16_t, uint16_t); 75 | void (*WritePixel)(uint16_t, uint16_t, uint16_t); 76 | uint16_t (*ReadPixel)(uint16_t, uint16_t); 77 | 78 | /* Optimized operation */ 79 | void (*SetDisplayWindow)(uint16_t, uint16_t, uint16_t, uint16_t); 80 | void (*DrawHLine)(uint16_t, uint16_t, uint16_t, uint16_t); 81 | void (*DrawVLine)(uint16_t, uint16_t, uint16_t, uint16_t); 82 | 83 | uint16_t (*GetLcdPixelWidth)(void); 84 | uint16_t (*GetLcdPixelHeight)(void); 85 | void (*DrawBitmap)(uint16_t, uint16_t, uint8_t*); 86 | void (*DrawRGBImage)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t*); 87 | }LCD_DrvTypeDef; 88 | /** 89 | * @} 90 | */ 91 | 92 | /** 93 | * @} 94 | */ 95 | 96 | /** 97 | * @} 98 | */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | /** 105 | * @} 106 | */ 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif /* __LCD_H */ 113 | 114 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 115 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/magneto.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file magneto.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This header file contains the functions prototypes for the MAGNETO driver. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2015 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ 39 | #ifndef __MAGNETO_H 40 | #define __MAGNETO_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /* Includes ------------------------------------------------------------------*/ 47 | #include 48 | 49 | /** @addtogroup BSP 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup Components 54 | * @{ 55 | */ 56 | 57 | /** @addtogroup MAGNETO 58 | * @{ 59 | */ 60 | 61 | /** @defgroup MAGNETO_Exported_Types 62 | * @{ 63 | */ 64 | 65 | /** @defgroup MAGNETO_Config_structure Magnetometer Configuration structure 66 | * @{ 67 | */ 68 | typedef struct 69 | { 70 | uint8_t Register1; 71 | uint8_t Register2; 72 | uint8_t Register3; 73 | uint8_t Register4; 74 | uint8_t Register5; 75 | }MAGNETO_InitTypeDef; 76 | /** 77 | * @} 78 | */ 79 | 80 | /** @defgroup MAGNETO_Driver_structure Magnetometer Driver structure 81 | * @{ 82 | */ 83 | typedef struct 84 | { 85 | void (*Init)(MAGNETO_InitTypeDef); 86 | void (*DeInit)(void); 87 | uint8_t (*ReadID)(void); 88 | void (*Reset)(void); 89 | void (*LowPower)(void); 90 | void (*ConfigIT)(void); 91 | void (*EnableIT)(uint8_t); 92 | void (*DisableIT)(uint8_t); 93 | uint8_t (*ITStatus)(uint16_t); 94 | void (*ClearIT)(void); 95 | void (*FilterConfig)(uint8_t); 96 | void (*FilterCmd)(uint8_t); 97 | void (*GetXYZ)(int16_t *); 98 | }MAGNETO_DrvTypeDef; 99 | /** 100 | * @} 101 | */ 102 | 103 | /** 104 | * @} 105 | */ 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /** 112 | * @} 113 | */ 114 | 115 | /** 116 | * @} 117 | */ 118 | 119 | #ifdef __cplusplus 120 | } 121 | #endif 122 | 123 | #endif /* __MAGNETO_H */ 124 | 125 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 126 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/ts.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file ts.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This file contains all the functions prototypes for the Touch Screen driver. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2015 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ 39 | #ifndef __TS_H 40 | #define __TS_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /* Includes ------------------------------------------------------------------*/ 47 | #include 48 | 49 | /** @addtogroup BSP 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup Components 54 | * @{ 55 | */ 56 | 57 | /** @addtogroup TS 58 | * @{ 59 | */ 60 | 61 | /** @defgroup TS_Exported_Types 62 | * @{ 63 | */ 64 | 65 | /** @defgroup TS_Driver_structure Touch Sensor Driver structure 66 | * @{ 67 | */ 68 | typedef struct 69 | { 70 | void (*Init)(uint16_t); 71 | uint16_t (*ReadID)(uint16_t); 72 | void (*Reset)(uint16_t); 73 | void (*Start)(uint16_t); 74 | uint8_t (*DetectTouch)(uint16_t); 75 | void (*GetXY)(uint16_t, uint16_t*, uint16_t*); 76 | void (*EnableIT)(uint16_t); 77 | void (*ClearIT)(uint16_t); 78 | uint8_t (*GetITStatus)(uint16_t); 79 | void (*DisableIT)(uint16_t); 80 | }TS_DrvTypeDef; 81 | /** 82 | * @} 83 | */ 84 | 85 | /** 86 | * @} 87 | */ 88 | 89 | /** 90 | * @} 91 | */ 92 | 93 | /** 94 | * @} 95 | */ 96 | 97 | /** 98 | * @} 99 | */ 100 | 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif /* __TS_H */ 106 | 107 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 108 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/Common/tsensor.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file tsensor.h 4 | * @author MCD Application Team 5 | * @version V4.0.1 6 | * @date 21-July-2015 7 | * @brief This header file contains the functions prototypes for the 8 | * Temperature Sensor driver. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT(c) 2015 STMicroelectronics

13 | * 14 | * Redistribution and use in source and binary forms, with or without modification, 15 | * are permitted provided that the following conditions are met: 16 | * 1. Redistributions of source code must retain the above copyright notice, 17 | * this list of conditions and the following disclaimer. 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, 19 | * this list of conditions and the following disclaimer in the documentation 20 | * and/or other materials provided with the distribution. 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 22 | * may be used to endorse or promote products derived from this software 23 | * without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | * 36 | ****************************************************************************** 37 | */ 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __TSENSOR_H 41 | #define __TSENSOR_H 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /* Includes ------------------------------------------------------------------*/ 48 | #include 49 | 50 | /** @addtogroup BSP 51 | * @{ 52 | */ 53 | 54 | /** @addtogroup Components 55 | * @{ 56 | */ 57 | 58 | /** @addtogroup TSENSOR 59 | * @{ 60 | */ 61 | 62 | /** @defgroup TSENSOR_Exported_Types 63 | * @{ 64 | */ 65 | 66 | /** @defgroup TSENSOR_Config_structure Temperature Sensor Configuration structure 67 | * @{ 68 | */ 69 | typedef struct 70 | { 71 | uint8_t AlertMode; /* Alert Mode Temperature out of range*/ 72 | uint8_t ConversionMode; /* Continuous/One Shot Mode */ 73 | uint8_t ConversionResolution; /* Temperature Resolution */ 74 | uint8_t ConversionRate; /* Number of measure per second */ 75 | uint8_t TemperatureLimitHigh; /* High Temperature Limit Range */ 76 | uint8_t TemperatureLimitLow; /* Low Temperature Limit Range */ 77 | }TSENSOR_InitTypeDef; 78 | /** 79 | * @} 80 | */ 81 | 82 | /** @defgroup TSENSOR_Driver_structure Temperature Sensor Driver structure 83 | * @{ 84 | */ 85 | typedef struct 86 | { 87 | void (*Init)(uint16_t, TSENSOR_InitTypeDef *); 88 | uint8_t (*IsReady)(uint16_t, uint32_t); 89 | uint8_t (*ReadStatus)(uint16_t); 90 | uint16_t (*ReadTemp)(uint16_t); 91 | }TSENSOR_DrvTypeDef; 92 | /** 93 | * @} 94 | */ 95 | 96 | /** 97 | * @} 98 | */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | /** 105 | * @} 106 | */ 107 | 108 | /** 109 | * @} 110 | */ 111 | 112 | #ifdef __cplusplus 113 | } 114 | #endif 115 | 116 | #endif /* __TSENSOR_H */ 117 | 118 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 119 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/cs43l22/cs43l22.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file cs43l22.h 4 | * @author MCD Application Team 5 | * @brief This file contains all the functions prototypes for the cs43l22.c driver. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© COPYRIGHT(c) 2015 STMicroelectronics

10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, 16 | * this list of conditions and the following disclaimer in the documentation 17 | * and/or other materials provided with the distribution. 18 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 19 | * may be used to endorse or promote products derived from this software 20 | * without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 28 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 30 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | ****************************************************************************** 34 | */ 35 | 36 | /* Define to prevent recursive inclusion -------------------------------------*/ 37 | #ifndef __CS43L22_H 38 | #define __CS43L22_H 39 | 40 | /* Includes ------------------------------------------------------------------*/ 41 | #include "../Common/audio.h" 42 | 43 | /** @addtogroup BSP 44 | * @{ 45 | */ 46 | 47 | /** @addtogroup Component 48 | * @{ 49 | */ 50 | 51 | /** @addtogroup CS43L22 52 | * @{ 53 | */ 54 | 55 | /** @defgroup CS43L22_Exported_Types 56 | * @{ 57 | */ 58 | 59 | /** 60 | * @} 61 | */ 62 | 63 | /** @defgroup CS43L22_Exported_Constants 64 | * @{ 65 | */ 66 | 67 | /******************************************************************************/ 68 | /*************************** Codec User defines ******************************/ 69 | /******************************************************************************/ 70 | /* Codec output DEVICE */ 71 | #define OUTPUT_DEVICE_SPEAKER 1 72 | #define OUTPUT_DEVICE_HEADPHONE 2 73 | #define OUTPUT_DEVICE_BOTH 3 74 | #define OUTPUT_DEVICE_AUTO 4 75 | 76 | /* Volume Levels values */ 77 | #define DEFAULT_VOLMIN 0x00 78 | #define DEFAULT_VOLMAX 0xFF 79 | #define DEFAULT_VOLSTEP 0x04 80 | 81 | #define AUDIO_PAUSE 0 82 | #define AUDIO_RESUME 1 83 | 84 | /* Codec POWER DOWN modes */ 85 | #define CODEC_PDWN_HW 1 86 | #define CODEC_PDWN_SW 2 87 | 88 | /* MUTE commands */ 89 | #define AUDIO_MUTE_ON 1 90 | #define AUDIO_MUTE_OFF 0 91 | 92 | /* AUDIO FREQUENCY */ 93 | #define AUDIO_FREQUENCY_192K ((uint32_t)192000) 94 | #define AUDIO_FREQUENCY_96K ((uint32_t)96000) 95 | #define AUDIO_FREQUENCY_48K ((uint32_t)48000) 96 | #define AUDIO_FREQUENCY_44K ((uint32_t)44100) 97 | #define AUDIO_FREQUENCY_32K ((uint32_t)32000) 98 | #define AUDIO_FREQUENCY_22K ((uint32_t)22050) 99 | #define AUDIO_FREQUENCY_16K ((uint32_t)16000) 100 | #define AUDIO_FREQUENCY_11K ((uint32_t)11025) 101 | #define AUDIO_FREQUENCY_8K ((uint32_t)8000) 102 | 103 | /** CS43l22 Registers ***/ 104 | #define CS43L22_REG_ID 0x01 105 | #define CS43L22_REG_POWER_CTL1 0x02 106 | #define CS43L22_REG_POWER_CTL2 0x04 107 | #define CS43L22_REG_CLOCKING_CTL 0x05 108 | #define CS43L22_REG_INTERFACE_CTL1 0x06 109 | #define CS43L22_REG_INTERFACE_CTL2 0x07 110 | #define CS43L22_REG_PASSTHR_A_SELECT 0x08 111 | #define CS43L22_REG_PASSTHR_B_SELECT 0x09 112 | #define CS43L22_REG_ANALOG_ZC_SR_SETT 0x0A 113 | #define CS43L22_REG_PASSTHR_GANG_CTL 0x0C 114 | #define CS43L22_REG_PLAYBACK_CTL1 0x0D 115 | #define CS43L22_REG_MISC_CTL 0x0E 116 | #define CS43L22_REG_PLAYBACK_CTL2 0x0F 117 | #define CS43L22_REG_PASSTHR_A_VOL 0x14 118 | #define CS43L22_REG_PASSTHR_B_VOL 0x15 119 | #define CS43L22_REG_PCMA_VOL 0x1A 120 | #define CS43L22_REG_PCMB_VOL 0x1B 121 | #define CS43L22_REG_BEEP_FREQ_ON_TIME 0x1C 122 | #define CS43L22_REG_BEEP_VOL_OFF_TIME 0x1D 123 | #define CS43L22_REG_BEEP_TONE_CFG 0x1E 124 | #define CS43L22_REG_TONE_CTL 0x1F 125 | #define CS43L22_REG_MASTER_A_VOL 0x20 126 | #define CS43L22_REG_MASTER_B_VOL 0x21 127 | #define CS43L22_REG_HEADPHONE_A_VOL 0x22 128 | #define CS43L22_REG_HEADPHONE_B_VOL 0x23 129 | #define CS43L22_REG_SPEAKER_A_VOL 0x24 130 | #define CS43L22_REG_SPEAKER_B_VOL 0x25 131 | #define CS43L22_REG_CH_MIXER_SWAP 0x26 132 | #define CS43L22_REG_LIMIT_CTL1 0x27 133 | #define CS43L22_REG_LIMIT_CTL2 0x28 134 | #define CS43L22_REG_LIMIT_ATTACK_RATE 0x29 135 | #define CS43L22_REG_OVF_CLK_STATUS 0x2E 136 | #define CS43L22_REG_BATT_COMPENSATION 0x2F 137 | #define CS43L22_REG_VP_BATTERY_LEVEL 0x30 138 | #define CS43L22_REG_SPEAKER_STATUS 0x31 139 | #define CS43L22_REG_TEMPMONITOR_CTL 0x32 140 | #define CS43L22_REG_THERMAL_FOLDBACK 0x33 141 | #define CS43L22_REG_CHARGE_PUMP_FREQ 0x34 142 | 143 | /******************************************************************************/ 144 | /****************************** REGISTER MAPPING ******************************/ 145 | /******************************************************************************/ 146 | /** 147 | * @brief CS43L22 ID 148 | */ 149 | #define CS43L22_ID 0xE0 150 | #define CS43L22_ID_MASK 0xF8 151 | /** 152 | * @brief Chip ID Register: Chip I.D. and Revision Register 153 | * Read only register 154 | * Default value: 0x01 155 | * [7:3] CHIPID[4:0]: I.D. code for the CS43L22. 156 | * Default value: 11100b 157 | * [2:0] REVID[2:0]: CS43L22 revision level. 158 | * Default value: 159 | * 000 - Rev A0 160 | * 001 - Rev A1 161 | * 010 - Rev B0 162 | * 011 - Rev B1 163 | */ 164 | #define CS43L22_CHIPID_ADDR 0x01 165 | 166 | /** 167 | * @} 168 | */ 169 | 170 | /** @defgroup CS43L22_Exported_Macros 171 | * @{ 172 | */ 173 | 174 | /** 175 | * @} 176 | */ 177 | 178 | /** @defgroup CS43L22_Exported_Functions 179 | * @{ 180 | */ 181 | 182 | /*------------------------------------------------------------------------------ 183 | Audio Codec functions 184 | ------------------------------------------------------------------------------*/ 185 | /* High Layer codec functions */ 186 | uint32_t cs43l22_Init(uint16_t DeviceAddr, uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq); 187 | void cs43l22_DeInit(void); 188 | uint32_t cs43l22_ReadID(uint16_t DeviceAddr); 189 | uint32_t cs43l22_Play(uint16_t DeviceAddr, uint16_t* pBuffer, uint16_t Size); 190 | uint32_t cs43l22_Pause(uint16_t DeviceAddr); 191 | uint32_t cs43l22_Resume(uint16_t DeviceAddr); 192 | uint32_t cs43l22_Stop(uint16_t DeviceAddr, uint32_t Cmd); 193 | uint32_t cs43l22_SetVolume(uint16_t DeviceAddr, uint8_t Volume); 194 | uint32_t cs43l22_SetFrequency(uint16_t DeviceAddr, uint32_t AudioFreq); 195 | uint32_t cs43l22_SetMute(uint16_t DeviceAddr, uint32_t Cmd); 196 | uint32_t cs43l22_SetOutputMode(uint16_t DeviceAddr, uint8_t Output); 197 | uint32_t cs43l22_Reset(uint16_t DeviceAddr); 198 | 199 | /* AUDIO IO functions */ 200 | void AUDIO_IO_Init(void); 201 | void AUDIO_IO_DeInit(void); 202 | void AUDIO_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); 203 | uint8_t AUDIO_IO_Read(uint8_t Addr, uint8_t Reg); 204 | 205 | /* Audio driver structure */ 206 | extern AUDIO_DrvTypeDef cs43l22_drv; 207 | 208 | #endif /* __CS43L22_H */ 209 | 210 | /** 211 | * @} 212 | */ 213 | 214 | /** 215 | * @} 216 | */ 217 | 218 | /** 219 | * @} 220 | */ 221 | 222 | /** 223 | * @} 224 | */ 225 | 226 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 227 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/ft6x06/Release_Notes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Release Notes for FT6X06 Component Drivers 8 | 14 | 15 | 18 | 19 | 20 |
21 |
22 |
23 |
24 |
25 |

Release Notes for FT6X06 Component Drivers

26 |

Copyright © 2016 STMicroelectronics
27 |

28 | 29 |
30 |
31 |
32 |

License

33 |

Licensed by ST under BSD 3-Clause license (the "License"). You may not use this package except in compliance with the License. You may obtain a copy of the License at:

34 |

https://opensource.org/licenses/BSD-3-Clause

35 |

Purpose

36 |

This directory contains the FT6X06 component drivers.

37 |
38 |
39 |

Update History

40 |
41 | 42 |
43 |

Main Changes

44 |
    45 |
  • Add new FT6xx6 chip ID.
  • 46 |
47 |
48 |
49 |
50 | 51 |
52 |

Main Changes

53 |
    54 |
  • Update release notes format
  • 55 |
56 |
57 |
58 |
59 | 60 |
61 |

Main Changes

62 |
    63 |
  • Reformat the BSD 3-Clause license declaration in the files header (replace license terms by a web reference to OSI website where those terms lie)
  • 64 |
65 |
66 |
67 |
68 | 69 |
70 |

Main Changes

71 |
    72 |
  • Add support of FT6x36 Touch controller
  • 73 |
74 |
75 |
76 |
77 | 78 |
79 |

Main Changes

80 |
    81 |
  • First official release
  • 82 |
83 |
84 |
85 |
86 |
87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/ft6x06/_htmresc/st_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvgl/lv_port_stm32f469_disco/c285583409894fbca7557fe8d145d8b65333d479/Drivers/BSP/Components/ft6x06/_htmresc/st_logo.png -------------------------------------------------------------------------------- /Drivers/BSP/Components/n25q128a/n25q128a.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file n25q128a.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 29-May-2015 7 | * @brief This file contains all the description of the N25Q128A QSPI memory. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2015 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ 39 | #ifndef __N25Q128A_H 40 | #define __N25Q128A_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /* Includes ------------------------------------------------------------------*/ 47 | 48 | /** @addtogroup BSP 49 | * @{ 50 | */ 51 | 52 | /** @addtogroup Components 53 | * @{ 54 | */ 55 | 56 | /** @addtogroup n25q128a 57 | * @{ 58 | */ 59 | 60 | /** @defgroup N25Q128A_Exported_Types 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup N25Q128A_Exported_Constants 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @brief N25Q128A Configuration 74 | */ 75 | #define N25Q128A_FLASH_SIZE 0x1000000 /* 128 MBits => 16MBytes */ 76 | #define N25Q128A_SECTOR_SIZE 0x10000 /* 256 sectors of 64KBytes */ 77 | #define N25Q128A_SUBSECTOR_SIZE 0x1000 /* 4096 subsectors of 4kBytes */ 78 | #define N25Q128A_PAGE_SIZE 0x100 /* 65536 pages of 256 bytes */ 79 | 80 | #define N25Q128A_DUMMY_CYCLES_READ 8 81 | #define N25Q128A_DUMMY_CYCLES_READ_QUAD 10 82 | 83 | #define N25Q128A_BULK_ERASE_MAX_TIME 250000 84 | #define N25Q128A_SECTOR_ERASE_MAX_TIME 3000 85 | #define N25Q128A_SUBSECTOR_ERASE_MAX_TIME 800 86 | 87 | /** 88 | * @brief N25Q128A Commands 89 | */ 90 | /* Reset Operations */ 91 | #define RESET_ENABLE_CMD 0x66 92 | #define RESET_MEMORY_CMD 0x99 93 | 94 | /* Identification Operations */ 95 | #define READ_ID_CMD 0x9E 96 | #define READ_ID_CMD2 0x9F 97 | #define MULTIPLE_IO_READ_ID_CMD 0xAF 98 | #define READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5A 99 | 100 | /* Read Operations */ 101 | #define READ_CMD 0x03 102 | #define FAST_READ_CMD 0x0B 103 | #define DUAL_OUT_FAST_READ_CMD 0x3B 104 | #define DUAL_INOUT_FAST_READ_CMD 0xBB 105 | #define QUAD_OUT_FAST_READ_CMD 0x6B 106 | #define QUAD_INOUT_FAST_READ_CMD 0xEB 107 | 108 | /* Write Operations */ 109 | #define WRITE_ENABLE_CMD 0x06 110 | #define WRITE_DISABLE_CMD 0x04 111 | 112 | /* Register Operations */ 113 | #define READ_STATUS_REG_CMD 0x05 114 | #define WRITE_STATUS_REG_CMD 0x01 115 | 116 | #define READ_LOCK_REG_CMD 0xE8 117 | #define WRITE_LOCK_REG_CMD 0xE5 118 | 119 | #define READ_FLAG_STATUS_REG_CMD 0x70 120 | #define CLEAR_FLAG_STATUS_REG_CMD 0x50 121 | 122 | #define READ_NONVOL_CFG_REG_CMD 0xB5 123 | #define WRITE_NONVOL_CFG_REG_CMD 0xB1 124 | 125 | #define READ_VOL_CFG_REG_CMD 0x85 126 | #define WRITE_VOL_CFG_REG_CMD 0x81 127 | 128 | #define READ_ENHANCED_VOL_CFG_REG_CMD 0x65 129 | #define WRITE_ENHANCED_VOL_CFG_REG_CMD 0x61 130 | 131 | /* Program Operations */ 132 | #define PAGE_PROG_CMD 0x02 133 | #define DUAL_IN_FAST_PROG_CMD 0xA2 134 | #define EXT_DUAL_IN_FAST_PROG_CMD 0xD2 135 | #define QUAD_IN_FAST_PROG_CMD 0x32 136 | #define EXT_QUAD_IN_FAST_PROG_CMD 0x12 137 | 138 | /* Erase Operations */ 139 | #define SUBSECTOR_ERASE_CMD 0x20 140 | #define SECTOR_ERASE_CMD 0xD8 141 | #define BULK_ERASE_CMD 0xC7 142 | 143 | #define PROG_ERASE_RESUME_CMD 0x7A 144 | #define PROG_ERASE_SUSPEND_CMD 0x75 145 | 146 | /* One-Time Programmable Operations */ 147 | #define READ_OTP_ARRAY_CMD 0x4B 148 | #define PROG_OTP_ARRAY_CMD 0x42 149 | 150 | /** 151 | * @brief N25Q128A Registers 152 | */ 153 | /* Status Register */ 154 | #define N25Q128A_SR_WIP ((uint8_t)0x01) /*!< Write in progress */ 155 | #define N25Q128A_SR_WREN ((uint8_t)0x02) /*!< Write enable latch */ 156 | #define N25Q128A_SR_BLOCKPR ((uint8_t)0x5C) /*!< Block protected against program and erase operations */ 157 | #define N25Q128A_SR_PRBOTTOM ((uint8_t)0x20) /*!< Protected memory area defined by BLOCKPR starts from top or bottom */ 158 | #define N25Q128A_SR_SRWREN ((uint8_t)0x80) /*!< Status register write enable/disable */ 159 | 160 | /* Nonvolatile Configuration Register */ 161 | #define N25Q128A_NVCR_LOCK ((uint16_t)0x0001) /*!< Lock nonvolatile configuration register */ 162 | #define N25Q128A_NVCR_DUAL ((uint16_t)0x0004) /*!< Dual I/O protocol */ 163 | #define N25Q128A_NVCR_QUAB ((uint16_t)0x0008) /*!< Quad I/O protocol */ 164 | #define N25Q128A_NVCR_RH ((uint16_t)0x0010) /*!< Reset/hold */ 165 | #define N25Q128A_NVCR_ODS ((uint16_t)0x01C0) /*!< Output driver strength */ 166 | #define N25Q128A_NVCR_XIP ((uint16_t)0x0E00) /*!< XIP mode at power-on reset */ 167 | #define N25Q128A_NVCR_NB_DUMMY ((uint16_t)0xF000) /*!< Number of dummy clock cycles */ 168 | 169 | /* Volatile Configuration Register */ 170 | #define N25Q128A_VCR_WRAP ((uint8_t)0x03) /*!< Wrap */ 171 | #define N25Q128A_VCR_XIP ((uint8_t)0x08) /*!< XIP */ 172 | #define N25Q128A_VCR_NB_DUMMY ((uint8_t)0xF0) /*!< Number of dummy clock cycles */ 173 | 174 | /* Enhanced Volatile Configuration Register */ 175 | #define N25Q128A_EVCR_ODS ((uint8_t)0x07) /*!< Output driver strength */ 176 | #define N25Q128A_EVCR_VPPA ((uint8_t)0x08) /*!< Vpp accelerator */ 177 | #define N25Q128A_EVCR_RH ((uint8_t)0x10) /*!< Reset/hold */ 178 | #define N25Q128A_EVCR_DUAL ((uint8_t)0x40) /*!< Dual I/O protocol */ 179 | #define N25Q128A_EVCR_QUAD ((uint8_t)0x80) /*!< Quad I/O protocol */ 180 | 181 | /* Flag Status Register */ 182 | #define N25Q128A_FSR_PRERR ((uint8_t)0x02) /*!< Protection error */ 183 | #define N25Q128A_FSR_PGSUS ((uint8_t)0x04) /*!< Program operation suspended */ 184 | #define N25Q128A_FSR_VPPERR ((uint8_t)0x08) /*!< Invalid voltage during program or erase */ 185 | #define N25Q128A_FSR_PGERR ((uint8_t)0x10) /*!< Program error */ 186 | #define N25Q128A_FSR_ERERR ((uint8_t)0x20) /*!< Erase error */ 187 | #define N25Q128A_FSR_ERSUS ((uint8_t)0x40) /*!< Erase operation suspended */ 188 | #define N25Q128A_FSR_READY ((uint8_t)0x80) /*!< Ready or command in progress */ 189 | 190 | /** 191 | * @} 192 | */ 193 | 194 | /** @defgroup N25Q128A_Exported_Functions 195 | * @{ 196 | */ 197 | /** 198 | * @} 199 | */ 200 | 201 | /** 202 | * @} 203 | */ 204 | 205 | /** 206 | * @} 207 | */ 208 | 209 | /** 210 | * @} 211 | */ 212 | 213 | #ifdef __cplusplus 214 | } 215 | #endif 216 | 217 | #endif /* __N25Q128A_H */ 218 | 219 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 220 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/nt35510/Release_Notes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Release Notes for NT35510 Component Drivers 8 | 14 | 15 | 18 | 19 | 20 |
21 |
22 |
23 |
24 |
25 |

Release Notes for NT35510 Component Drivers

26 |

Copyright © 2020 STMicroelectronics
27 |

28 | 29 |
30 |
31 |
32 |

License

33 |

Licensed by ST under BSD 3-Clause license (the "License"). You may not use this package except in compliance with the License. You may obtain a copy of the License at:

34 |

https://opensource.org/licenses/BSD-3-Clause

35 |

Purpose

36 |

This directory contains the NT35510 LCD DSI component drivers.

37 |
38 |
39 |

Update History

40 |
41 | 42 |
43 |

Main Changes

44 |
    45 |
  • First official release
  • 46 |
47 |
48 |
49 |
50 |
51 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Drivers/BSP/Components/nt35510/_htmresc/st_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvgl/lv_port_stm32f469_disco/c285583409894fbca7557fe8d145d8b65333d479/Drivers/BSP/Components/nt35510/_htmresc/st_logo.png -------------------------------------------------------------------------------- /Drivers/BSP/STM32469I-Discovery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | This software component is provided to you as part of a software package and 2 | applicable license terms are in the Package_license file. If you received this 3 | software component outside of a package or without applicable license terms, 4 | the terms of the BSD-3-Clause license shall apply. 5 | You may obtain a copy of the BSD-3-Clause at: 6 | https://opensource.org/licenses/BSD-3-Clause 7 | -------------------------------------------------------------------------------- /Drivers/BSP/STM32469I-Discovery/STM32469I-Discovery_BSP_User_Manual.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvgl/lv_port_stm32f469_disco/c285583409894fbca7557fe8d145d8b65333d479/Drivers/BSP/STM32469I-Discovery/STM32469I-Discovery_BSP_User_Manual.chm -------------------------------------------------------------------------------- /Drivers/BSP/STM32469I-Discovery/_htmresc/st_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvgl/lv_port_stm32f469_disco/c285583409894fbca7557fe8d145d8b65333d479/Drivers/BSP/STM32469I-Discovery/_htmresc/st_logo.png -------------------------------------------------------------------------------- /Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_eeprom.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32469i_discovery_eeprom.h 4 | * @author MCD Application Team 5 | * @brief This file contains all the functions prototypes for 6 | * the stm32469i_discovery_eeprom.c firmware driver. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2017 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32F469I_DISCOVERY_EEPROM_H 22 | #define __STM32F469I_DISCOVERY_EEPROM_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32469i_discovery.h" 30 | 31 | /** @addtogroup BSP 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup STM32469I_Discovery 36 | * @{ 37 | */ 38 | 39 | /** @addtogroup STM32469I-Discovery_EEPROM 40 | * @brief This file includes the I2C EEPROM driver of STM32469I-Discovery board. 41 | * @{ 42 | */ 43 | 44 | /** @defgroup STM32469I-Discovery_EEPROM_Exported_Types STM32469I Discovery EEPROM Exported Types 45 | * @{ 46 | */ 47 | /** 48 | * @} 49 | */ 50 | 51 | /** @defgroup STM32469I-Discovery_EEPROM_Exported_Constants STM32469I Discovery EEPROM Exported Constants 52 | * @{ 53 | */ 54 | /* EEPROM hardware address and page size */ 55 | #define EEPROM_PAGESIZE ((uint8_t)4) 56 | #define EEPROM_MAX_SIZE ((uint16_t)0x2000) /* 64Kbit */ 57 | 58 | /* Maximum Timeout values for flags and events waiting loops. 59 | This timeout is based on systick set to 1ms*/ 60 | /* Timeout for read based if read all the EEPROM : EEPROM_MAX_SIZE * I2C_SPEED (640ms) */ 61 | #define EEPROM_READ_TIMEOUT ((uint32_t)(1000)) 62 | /* Timeout for write based on max write which is EEPROM_PAGESIZE bytes: EEPROM_PAGESIZE * I2C_SPEED (320us) */ 63 | #define EEPROM_WRITE_TIMEOUT ((uint32_t)(10)) 64 | 65 | /* Maximum number of trials for EEPROM_WaitEepromStandbyState() function */ 66 | #define EEPROM_MAX_TRIALS 3000 67 | 68 | #define EEPROM_OK 0 69 | #define EEPROM_FAIL 1 70 | #define EEPROM_TIMEOUT 2 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @defgroup STM32469I-Discovery_EEPROM_Exported_Macros STM32469I Discovery EEPROM Exported Macros 76 | * @{ 77 | */ 78 | /** 79 | * @} 80 | */ 81 | 82 | /** @defgroup STM32469I-Discovery_EEPROM_Exported_Functions STM32469I Discovery EEPROM Exported Functions 83 | * @{ 84 | */ 85 | uint32_t BSP_EEPROM_Init(void); 86 | uint8_t BSP_EEPROM_DeInit(void); 87 | uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead); 88 | uint32_t BSP_EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite); 89 | uint32_t BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite); 90 | uint32_t BSP_EEPROM_WaitEepromStandbyState(void); 91 | 92 | /* USER Callbacks: This function is declared as __weak in EEPROM driver and 93 | should be implemented into user application. 94 | BSP_EEPROM_TIMEOUT_UserCallback() function is called whenever a timeout condition 95 | occure during communication (waiting on an event that doesn't occur, bus 96 | errors, busy devices ...). */ 97 | void BSP_EEPROM_TIMEOUT_UserCallback(void); 98 | 99 | /* Link function for I2C EEPROM peripheral */ 100 | void EEPROM_IO_Init(void); 101 | HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize); 102 | HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize); 103 | HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials); 104 | 105 | /** 106 | * @} 107 | */ 108 | 109 | /** 110 | * @} 111 | */ 112 | 113 | /** 114 | * @} 115 | */ 116 | 117 | /** 118 | * @} 119 | */ 120 | 121 | #ifdef __cplusplus 122 | } 123 | #endif 124 | 125 | #endif /* __STM32F469I_DISCOVERY_EEPROM_H */ 126 | -------------------------------------------------------------------------------- /Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_qspi.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32469i_discovery_qspi.h 4 | * @author MCD Application Team 5 | * @brief This file contains the common defines and functions prototypes for 6 | * the stm32469i_discovery_qspi.c driver. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2017 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /** @addtogroup BSP 21 | * @{ 22 | */ 23 | 24 | /** @addtogroup STM32469I_Discovery 25 | * @{ 26 | */ 27 | 28 | /* Define to prevent recursive inclusion -------------------------------------*/ 29 | #ifndef __STM32469I_DISCOVERY_QSPI_H 30 | #define __STM32469I_DISCOVERY_QSPI_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | /* Includes ------------------------------------------------------------------*/ 37 | #include "stm32f4xx_hal.h" 38 | #include "../Components/n25q128a/n25q128a.h" 39 | 40 | 41 | /** @addtogroup STM32469I_Discovery_QSPI 42 | * @{ 43 | */ 44 | 45 | 46 | /* Exported constants --------------------------------------------------------*/ 47 | /** @defgroup STM32469I_Discovery_QSPI_Exported_Constants STM32469I Discovery QSPI Exported Constants 48 | * @{ 49 | */ 50 | /* QSPI Error codes */ 51 | #define QSPI_OK ((uint8_t)0x00) 52 | #define QSPI_ERROR ((uint8_t)0x01) 53 | #define QSPI_BUSY ((uint8_t)0x02) 54 | #define QSPI_NOT_SUPPORTED ((uint8_t)0x04) 55 | #define QSPI_SUSPENDED ((uint8_t)0x08) 56 | 57 | 58 | /* Definition for QSPI clock resources */ 59 | #define QSPI_CLK_ENABLE() __HAL_RCC_QSPI_CLK_ENABLE() 60 | #define QSPI_CLK_DISABLE() __HAL_RCC_QSPI_CLK_DISABLE() 61 | #define QSPI_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() 62 | #define QSPI_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() 63 | #define QSPI_DX_CLK_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() 64 | #define QSPI_DX_CLK_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() 65 | 66 | #define QSPI_FORCE_RESET() __HAL_RCC_QSPI_FORCE_RESET() 67 | #define QSPI_RELEASE_RESET() __HAL_RCC_QSPI_RELEASE_RESET() 68 | 69 | /* Definition for QSPI Pins */ 70 | #define QSPI_CS_PIN GPIO_PIN_6 71 | #define QSPI_CS_GPIO_PORT GPIOB 72 | #define QSPI_CLK_PIN GPIO_PIN_10 73 | #define QSPI_CLK_GPIO_PORT GPIOF 74 | #define QSPI_D0_PIN GPIO_PIN_8 75 | #define QSPI_D1_PIN GPIO_PIN_9 76 | #define QSPI_D2_PIN GPIO_PIN_7 77 | #define QSPI_D3_PIN GPIO_PIN_6 78 | #define QSPI_DX_GPIO_PORT GPIOF 79 | 80 | 81 | /** 82 | * @} 83 | */ 84 | 85 | /* Exported types ------------------------------------------------------------*/ 86 | /** @defgroup STM32469I_Discovery_QSPI_Exported_Types STM32469I Discovery QSPI Exported Types 87 | * @{ 88 | */ 89 | /** 90 | * @brief QSPI Info 91 | * */ 92 | typedef struct { 93 | uint32_t FlashSize; /*!< Size of the flash */ 94 | uint32_t EraseSectorSize; /*!< Size of sectors for the erase operation */ 95 | uint32_t EraseSectorsNumber; /*!< Number of sectors for the erase operation */ 96 | uint32_t ProgPageSize; /*!< Size of pages for the program operation */ 97 | uint32_t ProgPagesNumber; /*!< Number of pages for the program operation */ 98 | } QSPI_InfoTypeDef; 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | 105 | /* Exported functions --------------------------------------------------------*/ 106 | /** @addtogroup STM32469I_Discovery_QSPI_Exported_Functions STM32469I Discovery QSPI Exported Functions 107 | * @{ 108 | */ 109 | uint8_t BSP_QSPI_Init (void); 110 | uint8_t BSP_QSPI_DeInit (void); 111 | uint8_t BSP_QSPI_Read (uint8_t* pData, uint32_t ReadAddr, uint32_t Size); 112 | uint8_t BSP_QSPI_Write (uint8_t* pData, uint32_t WriteAddr, uint32_t Size); 113 | uint8_t BSP_QSPI_Erase_Block(uint32_t BlockAddress); 114 | uint8_t BSP_QSPI_Erase_Chip (void); 115 | uint8_t BSP_QSPI_GetStatus (void); 116 | uint8_t BSP_QSPI_GetInfo (QSPI_InfoTypeDef* pInfo); 117 | uint8_t BSP_QSPI_EnableMemoryMappedMode(void); 118 | /* BSP Aliased function maintained for legacy purpose */ 119 | #define BSP_QSPI_MemoryMappedMode BSP_QSPI_EnableMemoryMappedMode 120 | 121 | /* These function can be modified in case the current settings (e.g. DMA stream) 122 | need to be changed for specific application needs */ 123 | void BSP_QSPI_MspInit(QSPI_HandleTypeDef *hqspi, void *Params); 124 | void BSP_QSPI_MspDeInit(QSPI_HandleTypeDef *hqspi, void *Params); 125 | 126 | /** 127 | * @} 128 | */ 129 | 130 | /** 131 | * @} 132 | */ 133 | 134 | #ifdef __cplusplus 135 | } 136 | #endif 137 | 138 | #endif /* __STM32469I_DISCOVERY_QSPI_H */ 139 | /** 140 | * @} 141 | */ 142 | 143 | /** 144 | * @} 145 | */ 146 | -------------------------------------------------------------------------------- /Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sd.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32469i_discovery_sd.h 4 | * @author MCD Application Team 5 | * @brief This file contains the common defines and functions prototypes for 6 | * the stm32469i_discovery_sd.c driver. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2017 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32469I_DISCOVERY_SD_H 22 | #define __STM32469I_DISCOVERY_SD_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32469i_discovery.h" 30 | 31 | /** @addtogroup BSP 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup STM32469I_Discovery 36 | * @{ 37 | */ 38 | 39 | /** @addtogroup STM32469I-Discovery_SD 40 | * @{ 41 | */ 42 | 43 | /** @defgroup STM32469I-Discovery_SD_Exported_Types STM32469I Discovery SD Exported Types 44 | * @{ 45 | */ 46 | 47 | /** 48 | * @brief SD Card information structure 49 | */ 50 | #define BSP_SD_CardInfo HAL_SD_CardInfoTypeDef 51 | /** 52 | * @} 53 | */ 54 | 55 | /** 56 | * @brief SD status structure definition 57 | */ 58 | #define MSD_OK ((uint8_t)0x00) 59 | #define MSD_ERROR ((uint8_t)0x01) 60 | #define MSD_ERROR_SD_NOT_PRESENT ((uint8_t)0x02) 61 | 62 | /** 63 | * @brief SD transfer state definition 64 | */ 65 | #define SD_TRANSFER_OK ((uint8_t)0x00) 66 | #define SD_TRANSFER_BUSY ((uint8_t)0x01) 67 | 68 | /** @defgroup STM32469I-Discovery_SD_Exported_Constants STM32469I Discovery SD Exported Constants 69 | * @{ 70 | */ 71 | #define SD_PRESENT ((uint8_t)0x01) 72 | #define SD_NOT_PRESENT ((uint8_t)0x00) 73 | 74 | #define SD_DATATIMEOUT ((uint32_t)100000000) 75 | 76 | /* DMA definitions for SD DMA transfer */ 77 | #define __DMAx_TxRx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE 78 | #define SD_DMAx_Tx_CHANNEL DMA_CHANNEL_4 79 | #define SD_DMAx_Rx_CHANNEL DMA_CHANNEL_4 80 | #define SD_DMAx_Tx_STREAM DMA2_Stream6 81 | #define SD_DMAx_Rx_STREAM DMA2_Stream3 82 | #define SD_DMAx_Tx_IRQn DMA2_Stream6_IRQn 83 | #define SD_DMAx_Rx_IRQn DMA2_Stream3_IRQn 84 | #define BSP_SD_IRQHandler SDIO_IRQHandler 85 | #define BSP_SD_DMA_Tx_IRQHandler DMA2_Stream6_IRQHandler 86 | #define BSP_SD_DMA_Rx_IRQHandler DMA2_Stream3_IRQHandler 87 | #define SD_DetectIRQHandler() HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8) 88 | /** 89 | * @} 90 | */ 91 | 92 | /** @defgroup STM32469I-Discovery_SD_Exported_Macro STM32469I Discovery SD Exported Macro 93 | * @{ 94 | */ 95 | /** 96 | * @} 97 | */ 98 | 99 | /** @defgroup STM32469I-Discovery_SD_Exported_Functions STM32469I Discovery SD Exported Functions 100 | * @{ 101 | */ 102 | uint8_t BSP_SD_Init(void); 103 | uint8_t BSP_SD_DeInit(void); 104 | uint8_t BSP_SD_ITConfig(void); 105 | uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout); 106 | uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout); 107 | uint8_t BSP_SD_ReadBlocks_DMA(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks); 108 | uint8_t BSP_SD_WriteBlocks_DMA(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks); 109 | uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr); 110 | uint8_t BSP_SD_GetCardState(void); 111 | void BSP_SD_GetCardInfo(HAL_SD_CardInfoTypeDef *CardInfo); 112 | uint8_t BSP_SD_IsDetected(void); 113 | 114 | /* These functions can be modified in case the current settings (e.g. DMA stream) 115 | need to be changed for specific application needs */ 116 | void BSP_SD_MspInit(SD_HandleTypeDef *hsd, void *Params); 117 | void BSP_SD_Detect_MspInit(SD_HandleTypeDef *hsd, void *Params); 118 | void BSP_SD_MspDeInit(SD_HandleTypeDef *hsd, void *Params); 119 | void BSP_SD_AbortCallback(void); 120 | void BSP_SD_WriteCpltCallback(void); 121 | void BSP_SD_ReadCpltCallback(void); 122 | 123 | /** 124 | * @} 125 | */ 126 | 127 | /** 128 | * @} 129 | */ 130 | 131 | /** 132 | * @} 133 | */ 134 | 135 | /** 136 | * @} 137 | */ 138 | 139 | #ifdef __cplusplus 140 | } 141 | #endif 142 | 143 | #endif /* __STM32469I_DISCOVERY_SD_H */ 144 | -------------------------------------------------------------------------------- /Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sdram.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32469i_discovery_sdram.h 4 | * @author MCD Application Team 5 | * @brief This file contains the common defines and functions prototypes for 6 | * the stm32469i_discovery_sdram.c driver. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2017 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32469I_DISCOVERY_SDRAM_H 22 | #define __STM32469I_DISCOVERY_SDRAM_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f4xx_hal.h" 30 | 31 | /** @addtogroup BSP 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup STM32469I_Discovery 36 | * @{ 37 | */ 38 | 39 | /** @addtogroup STM32469I-Discovery_SDRAM 40 | * @{ 41 | */ 42 | 43 | /** @defgroup STM32469I-Discovery_SDRAM_Exported_Types STM32469I Discovery SDRAM Exported Types 44 | * @{ 45 | */ 46 | 47 | /** 48 | * @brief SDRAM status structure definition 49 | */ 50 | #define SDRAM_OK ((uint8_t)0x00) 51 | #define SDRAM_ERROR ((uint8_t)0x01) 52 | 53 | /** 54 | * @} 55 | */ 56 | 57 | /** @defgroup STM32469I-Discovery_SDRAM_Exported_Constants STM32469I Discovery SDRAM Exported Constants 58 | * @{ 59 | */ 60 | #define SDRAM_DEVICE_ADDR ((uint32_t)0xC0000000) 61 | 62 | /* SDRAM device size in Bytes */ 63 | #define SDRAM_DEVICE_SIZE ((uint32_t)0x1000000) 64 | 65 | #define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_32 66 | #define SDCLOCK_PERIOD FMC_SDRAM_CLOCK_PERIOD_2 67 | 68 | /* SDRAM refresh counter (90 MHz SD clock) */ 69 | #define REFRESH_COUNT ((uint32_t)0x0569) 70 | #define SDRAM_TIMEOUT ((uint32_t)0xFFFF) 71 | 72 | /* DMA definitions for SDRAM DMA transfer */ 73 | #define __DMAx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE 74 | #define __DMAx_CLK_DISABLE __HAL_RCC_DMA2_CLK_DISABLE 75 | #define SDRAM_DMAx_CHANNEL DMA_CHANNEL_0 76 | #define SDRAM_DMAx_STREAM DMA2_Stream0 77 | #define SDRAM_DMAx_IRQn DMA2_Stream0_IRQn 78 | #define SDRAM_DMAx_IRQHandler DMA2_Stream0_IRQHandler 79 | 80 | 81 | /** 82 | * @brief FMC SDRAM Mode definition register defines 83 | */ 84 | #define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000) 85 | #define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001) 86 | #define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002) 87 | #define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004) 88 | #define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000) 89 | #define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008) 90 | #define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020) 91 | #define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030) 92 | #define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000) 93 | #define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000) 94 | #define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200) 95 | /** 96 | * @} 97 | */ 98 | 99 | /** @defgroup STM32469I-Discovery_SDRAM_Exported_Macro STM32469I Discovery SDRAM Exported Macro 100 | * @{ 101 | */ 102 | /** 103 | * @} 104 | */ 105 | 106 | /** @addtogroup STM32469I_Discovery_SDRAM_Exported_Functions 107 | * @{ 108 | */ 109 | uint8_t BSP_SDRAM_Init(void); 110 | uint8_t BSP_SDRAM_DeInit(void); 111 | void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount); 112 | uint8_t BSP_SDRAM_ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); 113 | uint8_t BSP_SDRAM_ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); 114 | uint8_t BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); 115 | uint8_t BSP_SDRAM_WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); 116 | uint8_t BSP_SDRAM_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd); 117 | void BSP_SDRAM_DMA_IRQHandler(void); 118 | 119 | /* These function can be modified in case the current settings (e.g. DMA stream) 120 | need to be changed for specific application needs */ 121 | void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params); 122 | void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params); 123 | 124 | /** 125 | * @} 126 | */ 127 | 128 | /** 129 | * @} 130 | */ 131 | 132 | /** 133 | * @} 134 | */ 135 | 136 | /** 137 | * @} 138 | */ 139 | 140 | /** 141 | * @} 142 | */ 143 | 144 | #ifdef __cplusplus 145 | } 146 | #endif 147 | 148 | #endif /* __STM32469I_DISCOVERY_SDRAM_H */ 149 | -------------------------------------------------------------------------------- /Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_ts.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32469i_discovery_ts.h 4 | * @author MCD Application Team 5 | * @brief This file contains the common defines and functions prototypes for 6 | * the stm32469i_discovery_ts.c driver. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2017 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32469I_DISCOVERY_TS_H 22 | #define __STM32469I_DISCOVERY_TS_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32469i_discovery.h" 30 | #include "stm32469i_discovery_lcd.h" 31 | 32 | /* Include TouchScreen component driver */ 33 | #include "../Components/ft6x06/ft6x06.h" 34 | 35 | /** @addtogroup BSP 36 | * @{ 37 | */ 38 | 39 | /** @addtogroup STM32469I_Discovery 40 | * @{ 41 | */ 42 | 43 | /** @addtogroup STM32469I-Discovery_TS 44 | * @{ 45 | */ 46 | 47 | /** @defgroup STM32469I-Discovery_TS_Exported_Constants STM32469I Discovery TS Exported Constants 48 | * @{ 49 | */ 50 | /** @brief With FT6206 : maximum 2 touches detected simultaneously 51 | */ 52 | #define TS_MAX_NB_TOUCH ((uint32_t) FT6206_MAX_DETECTABLE_TOUCH) 53 | #define TS_NO_IRQ_PENDING ((uint8_t) 0) 54 | #define TS_IRQ_PENDING ((uint8_t) 1) 55 | 56 | #define TS_SWAP_NONE ((uint8_t) 0x01) 57 | #define TS_SWAP_X ((uint8_t) 0x02) 58 | #define TS_SWAP_Y ((uint8_t) 0x04) 59 | #define TS_SWAP_XY ((uint8_t) 0x08) 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | /** @defgroup STM32469I-Discovery_TS_Exported_Types STM32469I Discovery TS Exported Types 66 | * @{ 67 | */ 68 | /** 69 | * @brief TS_StateTypeDef 70 | * Define TS State structure 71 | */ 72 | typedef struct 73 | { 74 | uint8_t touchDetected; /*!< Total number of active touches detected at last scan */ 75 | uint16_t touchX[TS_MAX_NB_TOUCH]; /*!< Touch X[0], X[1] coordinates on 12 bits */ 76 | uint16_t touchY[TS_MAX_NB_TOUCH]; /*!< Touch Y[0], Y[1] coordinates on 12 bits */ 77 | 78 | #if (TS_MULTI_TOUCH_SUPPORTED == 1) 79 | uint8_t touchWeight[TS_MAX_NB_TOUCH]; /*!< Touch_Weight[0], Touch_Weight[1] : weight property of touches */ 80 | uint8_t touchEventId[TS_MAX_NB_TOUCH]; /*!< Touch_EventId[0], Touch_EventId[1] : take value of type @ref TS_TouchEventTypeDef */ 81 | uint8_t touchArea[TS_MAX_NB_TOUCH]; /*!< Touch_Area[0], Touch_Area[1] : touch area of each touch */ 82 | uint32_t gestureId; /*!< type of gesture detected : take value of type @ref TS_GestureIdTypeDef */ 83 | #endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ 84 | 85 | } TS_StateTypeDef; 86 | 87 | /** 88 | * @brief TS_StatusTypeDef 89 | * Define BSP_TS_xxx() functions possible return value, 90 | * when status is returned by those functions. 91 | */ 92 | typedef enum 93 | { 94 | TS_OK = 0x00, /*!< Touch Ok */ 95 | TS_ERROR = 0x01, /*!< Touch Error */ 96 | TS_TIMEOUT = 0x02, /*!< Touch Timeout */ 97 | TS_DEVICE_NOT_FOUND = 0x03 /*!< Touchscreen device not found */ 98 | } TS_StatusTypeDef; 99 | 100 | /** 101 | * @brief TS_GestureIdTypeDef 102 | * Define Possible managed gesture identification values returned by touch screen 103 | * driver. 104 | */ 105 | typedef enum 106 | { 107 | GEST_ID_NO_GESTURE = 0x00, /*!< Gesture not defined / recognized */ 108 | GEST_ID_MOVE_UP = 0x01, /*!< Gesture Move Up */ 109 | GEST_ID_MOVE_RIGHT = 0x02, /*!< Gesture Move Right */ 110 | GEST_ID_MOVE_DOWN = 0x03, /*!< Gesture Move Down */ 111 | GEST_ID_MOVE_LEFT = 0x04, /*!< Gesture Move Left */ 112 | GEST_ID_ZOOM_IN = 0x05, /*!< Gesture Zoom In */ 113 | GEST_ID_ZOOM_OUT = 0x06, /*!< Gesture Zoom Out */ 114 | GEST_ID_NB_MAX = 0x07 /*!< max number of gesture id */ 115 | } TS_GestureIdTypeDef; 116 | 117 | /** 118 | * @brief TS_TouchEventTypeDef 119 | * Define Possible touch events kind as returned values 120 | * by touch screen IC Driver. 121 | */ 122 | typedef enum 123 | { 124 | TOUCH_EVENT_NO_EVT = 0x00, /*!< Touch Event : undetermined */ 125 | TOUCH_EVENT_PRESS_DOWN = 0x01, /*!< Touch Event Press Down */ 126 | TOUCH_EVENT_LIFT_UP = 0x02, /*!< Touch Event Lift Up */ 127 | TOUCH_EVENT_CONTACT = 0x03, /*!< Touch Event Contact */ 128 | TOUCH_EVENT_NB_MAX = 0x04 /*!< max number of touch events kind */ 129 | } TS_TouchEventTypeDef; 130 | 131 | /** 132 | * @} 133 | */ 134 | 135 | /** @defgroup STM32469I-Discovery_TS_Imported_Variables STM32469I Discovery TS Imported Variables 136 | * @{ 137 | */ 138 | /** 139 | * @brief Table for touchscreen event information display on LCD : 140 | * table indexed on enum @ref TS_TouchEventTypeDef information 141 | */ 142 | extern char * ts_event_string_tab[TOUCH_EVENT_NB_MAX]; 143 | 144 | /** 145 | * @brief Table for touchscreen gesture Id information display on LCD : table indexed 146 | * on enum @ref TS_GestureIdTypeDef information 147 | */ 148 | extern char * ts_gesture_id_string_tab[GEST_ID_NB_MAX]; 149 | /** 150 | * @} 151 | */ 152 | 153 | /** @defgroup STM32469I-Discovery_TS_Exported_Functions STM32469I Discovery TS Exported Functions 154 | * @{ 155 | */ 156 | uint8_t BSP_TS_Init(uint16_t ts_SizeX, uint16_t ts_SizeY); 157 | uint8_t BSP_TS_GetState(TS_StateTypeDef *TS_State); 158 | 159 | #if (TS_MULTI_TOUCH_SUPPORTED == 1) 160 | uint8_t BSP_TS_Get_GestureId(TS_StateTypeDef *TS_State); 161 | uint8_t BSP_TS_ResetTouchData(TS_StateTypeDef *TS_State); 162 | #endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ 163 | 164 | uint8_t BSP_TS_ITConfig(void); 165 | 166 | 167 | /* These __weak function can be surcharged by application code in case the current settings 168 | need to be changed for specific (example GPIO allocation) */ 169 | void BSP_TS_INT_MspInit(void); 170 | 171 | /** 172 | * @} 173 | */ 174 | 175 | /** 176 | * @} 177 | */ 178 | 179 | /** 180 | * @} 181 | */ 182 | 183 | /** 184 | * @} 185 | */ 186 | 187 | 188 | #ifdef __cplusplus 189 | } 190 | #endif 191 | 192 | #endif /* __STM32469I_DISCOVERY_TS_H */ 193 | -------------------------------------------------------------------------------- /Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f4xx.h 4 | * @author MCD Application Team 5 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file 13 | * in the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | * 16 | ****************************************************************************** 17 | */ 18 | 19 | /** @addtogroup CMSIS 20 | * @{ 21 | */ 22 | 23 | /** @addtogroup stm32f4xx_system 24 | * @{ 25 | */ 26 | 27 | /** 28 | * @brief Define to prevent recursive inclusion 29 | */ 30 | #ifndef __SYSTEM_STM32F4XX_H 31 | #define __SYSTEM_STM32F4XX_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /** @addtogroup STM32F4xx_System_Includes 38 | * @{ 39 | */ 40 | 41 | /** 42 | * @} 43 | */ 44 | 45 | 46 | /** @addtogroup STM32F4xx_System_Exported_types 47 | * @{ 48 | */ 49 | /* This variable is updated in three ways: 50 | 1) by calling CMSIS function SystemCoreClockUpdate() 51 | 2) by calling HAL API function HAL_RCC_GetSysClockFreq() 52 | 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency 53 | Note: If you use this function to configure the system clock; then there 54 | is no need to call the 2 first functions listed above, since SystemCoreClock 55 | variable is updated automatically. 56 | */ 57 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 58 | 59 | extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */ 60 | extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */ 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @addtogroup STM32F4xx_System_Exported_Constants 67 | * @{ 68 | */ 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | /** @addtogroup STM32F4xx_System_Exported_Macros 75 | * @{ 76 | */ 77 | 78 | /** 79 | * @} 80 | */ 81 | 82 | /** @addtogroup STM32F4xx_System_Exported_Functions 83 | * @{ 84 | */ 85 | 86 | extern void SystemInit(void); 87 | extern void SystemCoreClockUpdate(void); 88 | /** 89 | * @} 90 | */ 91 | 92 | #ifdef __cplusplus 93 | } 94 | #endif 95 | 96 | #endif /*__SYSTEM_STM32F4XX_H */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /** 103 | * @} 104 | */ 105 | -------------------------------------------------------------------------------- /Drivers/CMSIS/Device/ST/STM32F4xx/LICENSE.txt: -------------------------------------------------------------------------------- 1 | This software component is provided to you as part of a software package and 2 | applicable license terms are in the Package_license file. If you received this 3 | software component outside of a package or without applicable license terms, 4 | the terms of the Apache-2.0 license shall apply. 5 | You may obtain a copy of the Apache-2.0 at: 6 | https://opensource.org/licenses/Apache-2.0 7 | -------------------------------------------------------------------------------- /Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /Drivers/CMSIS/Include/tz_context.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * @file tz_context.h 3 | * @brief Context Management for Armv8-M TrustZone 4 | * @version V1.0.1 5 | * @date 10. January 2018 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef TZ_CONTEXT_H 32 | #define TZ_CONTEXT_H 33 | 34 | #include 35 | 36 | #ifndef TZ_MODULEID_T 37 | #define TZ_MODULEID_T 38 | /// \details Data type that identifies secure software modules called by a process. 39 | typedef uint32_t TZ_ModuleId_t; 40 | #endif 41 | 42 | /// \details TZ Memory ID identifies an allocated memory slot. 43 | typedef uint32_t TZ_MemoryId_t; 44 | 45 | /// Initialize secure context memory system 46 | /// \return execution status (1: success, 0: error) 47 | uint32_t TZ_InitContextSystem_S (void); 48 | 49 | /// Allocate context memory for calling secure software modules in TrustZone 50 | /// \param[in] module identifies software modules called from non-secure mode 51 | /// \return value != 0 id TrustZone memory slot identifier 52 | /// \return value 0 no memory available or internal error 53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); 54 | 55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S 56 | /// \param[in] id TrustZone memory slot identifier 57 | /// \return execution status (1: success, 0: error) 58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); 59 | 60 | /// Load secure context (called on RTOS thread context switch) 61 | /// \param[in] id TrustZone memory slot identifier 62 | /// \return execution status (1: success, 0: error) 63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); 64 | 65 | /// Store secure context (called on RTOS thread context switch) 66 | /// \param[in] id TrustZone memory slot identifier 67 | /// \return execution status (1: success, 0: error) 68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); 69 | 70 | #endif // TZ_CONTEXT_H 71 | -------------------------------------------------------------------------------- /Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_hal_def.h 4 | * @author MCD Application Team 5 | * @brief This file contains HAL common defines, enumeration, macros and 6 | * structures definitions. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2017 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32F4xx_HAL_DEF 22 | #define __STM32F4xx_HAL_DEF 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f4xx.h" 30 | #include "Legacy/stm32_hal_legacy.h" 31 | #include 32 | 33 | /* Exported types ------------------------------------------------------------*/ 34 | 35 | /** 36 | * @brief HAL Status structures definition 37 | */ 38 | typedef enum 39 | { 40 | HAL_OK = 0x00U, 41 | HAL_ERROR = 0x01U, 42 | HAL_BUSY = 0x02U, 43 | HAL_TIMEOUT = 0x03U 44 | } HAL_StatusTypeDef; 45 | 46 | /** 47 | * @brief HAL Lock structures definition 48 | */ 49 | typedef enum 50 | { 51 | HAL_UNLOCKED = 0x00U, 52 | HAL_LOCKED = 0x01U 53 | } HAL_LockTypeDef; 54 | 55 | /* Exported macro ------------------------------------------------------------*/ 56 | 57 | #define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */ 58 | 59 | #define HAL_MAX_DELAY 0xFFFFFFFFU 60 | 61 | #define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == (BIT)) 62 | #define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U) 63 | 64 | #define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \ 65 | do{ \ 66 | (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \ 67 | (__DMA_HANDLE__).Parent = (__HANDLE__); \ 68 | } while(0U) 69 | 70 | /** @brief Reset the Handle's State field. 71 | * @param __HANDLE__ specifies the Peripheral Handle. 72 | * @note This macro can be used for the following purpose: 73 | * - When the Handle is declared as local variable; before passing it as parameter 74 | * to HAL_PPP_Init() for the first time, it is mandatory to use this macro 75 | * to set to 0 the Handle's "State" field. 76 | * Otherwise, "State" field may have any random value and the first time the function 77 | * HAL_PPP_Init() is called, the low level hardware initialization will be missed 78 | * (i.e. HAL_PPP_MspInit() will not be executed). 79 | * - When there is a need to reconfigure the low level hardware: instead of calling 80 | * HAL_PPP_DeInit() then HAL_PPP_Init(), user can make a call to this macro then HAL_PPP_Init(). 81 | * In this later function, when the Handle's "State" field is set to 0, it will execute the function 82 | * HAL_PPP_MspInit() which will reconfigure the low level hardware. 83 | * @retval None 84 | */ 85 | #define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0U) 86 | 87 | #if (USE_RTOS == 1U) 88 | /* Reserved for future use */ 89 | #error "USE_RTOS should be 0 in the current HAL release" 90 | #else 91 | #define __HAL_LOCK(__HANDLE__) \ 92 | do{ \ 93 | if((__HANDLE__)->Lock == HAL_LOCKED) \ 94 | { \ 95 | return HAL_BUSY; \ 96 | } \ 97 | else \ 98 | { \ 99 | (__HANDLE__)->Lock = HAL_LOCKED; \ 100 | } \ 101 | }while (0U) 102 | 103 | #define __HAL_UNLOCK(__HANDLE__) \ 104 | do{ \ 105 | (__HANDLE__)->Lock = HAL_UNLOCKED; \ 106 | }while (0U) 107 | #endif /* USE_RTOS */ 108 | 109 | #if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */ 110 | #ifndef __weak 111 | #define __weak __attribute__((weak)) 112 | #endif 113 | #ifndef __packed 114 | #define __packed __attribute__((packed)) 115 | #endif 116 | #elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */ 117 | #ifndef __weak 118 | #define __weak __attribute__((weak)) 119 | #endif /* __weak */ 120 | #ifndef __packed 121 | #define __packed __attribute__((__packed__)) 122 | #endif /* __packed */ 123 | #endif /* __GNUC__ */ 124 | 125 | 126 | /* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */ 127 | #if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */ 128 | #ifndef __ALIGN_BEGIN 129 | #define __ALIGN_BEGIN 130 | #endif 131 | #ifndef __ALIGN_END 132 | #define __ALIGN_END __attribute__ ((aligned (4))) 133 | #endif 134 | #elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */ 135 | #ifndef __ALIGN_END 136 | #define __ALIGN_END __attribute__ ((aligned (4))) 137 | #endif /* __ALIGN_END */ 138 | #ifndef __ALIGN_BEGIN 139 | #define __ALIGN_BEGIN 140 | #endif /* __ALIGN_BEGIN */ 141 | #else 142 | #ifndef __ALIGN_END 143 | #define __ALIGN_END 144 | #endif /* __ALIGN_END */ 145 | #ifndef __ALIGN_BEGIN 146 | #if defined (__CC_ARM) /* ARM Compiler V5*/ 147 | #define __ALIGN_BEGIN __align(4) 148 | #elif defined (__ICCARM__) /* IAR Compiler */ 149 | #define __ALIGN_BEGIN 150 | #endif /* __CC_ARM */ 151 | #endif /* __ALIGN_BEGIN */ 152 | #endif /* __GNUC__ */ 153 | 154 | 155 | /** 156 | * @brief __RAM_FUNC definition 157 | */ 158 | #if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) 159 | /* ARM Compiler V4/V5 and V6 160 | -------------------------- 161 | RAM functions are defined using the toolchain options. 162 | Functions that are executed in RAM should reside in a separate source module. 163 | Using the 'Options for File' dialog you can simply change the 'Code / Const' 164 | area of a module to a memory space in physical RAM. 165 | Available memory areas are declared in the 'Target' tab of the 'Options for Target' 166 | dialog. 167 | */ 168 | #define __RAM_FUNC 169 | 170 | #elif defined ( __ICCARM__ ) 171 | /* ICCARM Compiler 172 | --------------- 173 | RAM functions are defined using a specific toolchain keyword "__ramfunc". 174 | */ 175 | #define __RAM_FUNC __ramfunc 176 | 177 | #elif defined ( __GNUC__ ) 178 | /* GNU Compiler 179 | ------------ 180 | RAM functions are defined using a specific toolchain attribute 181 | "__attribute__((section(".RamFunc")))". 182 | */ 183 | #define __RAM_FUNC __attribute__((section(".RamFunc"))) 184 | 185 | #endif 186 | 187 | /** 188 | * @brief __NOINLINE definition 189 | */ 190 | #if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ ) 191 | /* ARM V4/V5 and V6 & GNU Compiler 192 | ------------------------------- 193 | */ 194 | #define __NOINLINE __attribute__ ( (noinline) ) 195 | 196 | #elif defined ( __ICCARM__ ) 197 | /* ICCARM Compiler 198 | --------------- 199 | */ 200 | #define __NOINLINE _Pragma("optimize = no_inline") 201 | 202 | #endif 203 | 204 | #ifdef __cplusplus 205 | } 206 | #endif 207 | 208 | #endif /* ___STM32F4xx_HAL_DEF */ 209 | 210 | 211 | -------------------------------------------------------------------------------- /Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_hal_dma_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of DMA HAL extension module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file in 13 | * the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | * 16 | ****************************************************************************** 17 | */ 18 | 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __STM32F4xx_HAL_DMA_EX_H 21 | #define __STM32F4xx_HAL_DMA_EX_H 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Includes ------------------------------------------------------------------*/ 28 | #include "stm32f4xx_hal_def.h" 29 | 30 | /** @addtogroup STM32F4xx_HAL_Driver 31 | * @{ 32 | */ 33 | 34 | /** @addtogroup DMAEx 35 | * @{ 36 | */ 37 | 38 | /* Exported types ------------------------------------------------------------*/ 39 | /** @defgroup DMAEx_Exported_Types DMAEx Exported Types 40 | * @brief DMAEx Exported types 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @brief HAL DMA Memory definition 46 | */ 47 | typedef enum 48 | { 49 | MEMORY0 = 0x00U, /*!< Memory 0 */ 50 | MEMORY1 = 0x01U /*!< Memory 1 */ 51 | }HAL_DMA_MemoryTypeDef; 52 | 53 | /** 54 | * @} 55 | */ 56 | 57 | /* Exported functions --------------------------------------------------------*/ 58 | /** @defgroup DMAEx_Exported_Functions DMAEx Exported Functions 59 | * @brief DMAEx Exported functions 60 | * @{ 61 | */ 62 | 63 | /** @defgroup DMAEx_Exported_Functions_Group1 Extended features functions 64 | * @brief Extended features functions 65 | * @{ 66 | */ 67 | 68 | /* IO operation functions *******************************************************/ 69 | HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength); 70 | HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength); 71 | HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Address, HAL_DMA_MemoryTypeDef memory); 72 | 73 | /** 74 | * @} 75 | */ 76 | /** 77 | * @} 78 | */ 79 | 80 | /* Private functions ---------------------------------------------------------*/ 81 | /** @defgroup DMAEx_Private_Functions DMAEx Private Functions 82 | * @brief DMAEx Private functions 83 | * @{ 84 | */ 85 | /** 86 | * @} 87 | */ 88 | 89 | /** 90 | * @} 91 | */ 92 | 93 | /** 94 | * @} 95 | */ 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | 101 | #endif /*__STM32F4xx_HAL_DMA_EX_H*/ 102 | 103 | -------------------------------------------------------------------------------- /Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_hal_flash_ramfunc.h 4 | * @author MCD Application Team 5 | * @brief Header file of FLASH RAMFUNC driver. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file in 13 | * the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | ****************************************************************************** 16 | */ 17 | 18 | /* Define to prevent recursive inclusion -------------------------------------*/ 19 | #ifndef __STM32F4xx_FLASH_RAMFUNC_H 20 | #define __STM32F4xx_FLASH_RAMFUNC_H 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) ||\ 26 | defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f4xx_hal_def.h" 30 | 31 | /** @addtogroup STM32F4xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup FLASH_RAMFUNC 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported macro ------------------------------------------------------------*/ 41 | /* Exported functions --------------------------------------------------------*/ 42 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions 43 | * @{ 44 | */ 45 | 46 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions_Group1 47 | * @{ 48 | */ 49 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StopFlashInterfaceClk(void); 50 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StartFlashInterfaceClk(void); 51 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableFlashSleepMode(void); 52 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void); 53 | /** 54 | * @} 55 | */ 56 | 57 | /** 58 | * @} 59 | */ 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | /** 66 | * @} 67 | */ 68 | 69 | #endif /* STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */ 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | 75 | #endif /* __STM32F4xx_FLASH_RAMFUNC_H */ 76 | 77 | -------------------------------------------------------------------------------- /Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_i2c_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_hal_i2c_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of I2C HAL Extension module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file 13 | * in the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | * 16 | ****************************************************************************** 17 | */ 18 | 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __STM32F4xx_HAL_I2C_EX_H 21 | #define __STM32F4xx_HAL_I2C_EX_H 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | #if defined(I2C_FLTR_ANOFF)&&defined(I2C_FLTR_DNF) 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f4xx_hal_def.h" 30 | 31 | /** @addtogroup STM32F4xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup I2CEx 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported constants --------------------------------------------------------*/ 41 | /** @defgroup I2CEx_Exported_Constants I2C Exported Constants 42 | * @{ 43 | */ 44 | 45 | /** @defgroup I2CEx_Analog_Filter I2C Analog Filter 46 | * @{ 47 | */ 48 | #define I2C_ANALOGFILTER_ENABLE 0x00000000U 49 | #define I2C_ANALOGFILTER_DISABLE I2C_FLTR_ANOFF 50 | /** 51 | * @} 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /* Exported macro ------------------------------------------------------------*/ 59 | /* Exported functions --------------------------------------------------------*/ 60 | /** @addtogroup I2CEx_Exported_Functions 61 | * @{ 62 | */ 63 | 64 | /** @addtogroup I2CEx_Exported_Functions_Group1 65 | * @{ 66 | */ 67 | /* Peripheral Control functions ************************************************/ 68 | HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter); 69 | HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter); 70 | /** 71 | * @} 72 | */ 73 | 74 | /** 75 | * @} 76 | */ 77 | /* Private types -------------------------------------------------------------*/ 78 | /* Private variables ---------------------------------------------------------*/ 79 | /* Private constants ---------------------------------------------------------*/ 80 | /** @defgroup I2CEx_Private_Constants I2C Private Constants 81 | * @{ 82 | */ 83 | 84 | /** 85 | * @} 86 | */ 87 | 88 | /* Private macros ------------------------------------------------------------*/ 89 | /** @defgroup I2CEx_Private_Macros I2C Private Macros 90 | * @{ 91 | */ 92 | #define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \ 93 | ((FILTER) == I2C_ANALOGFILTER_DISABLE)) 94 | #define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU) 95 | /** 96 | * @} 97 | */ 98 | 99 | /** 100 | * @} 101 | */ 102 | 103 | /** 104 | * @} 105 | */ 106 | 107 | #endif 108 | 109 | #ifdef __cplusplus 110 | } 111 | #endif 112 | 113 | #endif /* __STM32F4xx_HAL_I2C_EX_H */ 114 | 115 | 116 | -------------------------------------------------------------------------------- /Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_ltdc_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_hal_ltdc_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of LTDC HAL Extension module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file 13 | * in the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | * 16 | ****************************************************************************** 17 | */ 18 | 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef STM32F4xx_HAL_LTDC_EX_H 21 | #define STM32F4xx_HAL_LTDC_EX_H 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Includes ------------------------------------------------------------------*/ 28 | #include "stm32f4xx_hal_def.h" 29 | 30 | #if defined (LTDC) && defined (DSI) 31 | 32 | #include "stm32f4xx_hal_dsi.h" 33 | 34 | /** @addtogroup STM32F4xx_HAL_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup LTDCEx 39 | * @{ 40 | */ 41 | 42 | /* Exported types ------------------------------------------------------------*/ 43 | /* Exported constants --------------------------------------------------------*/ 44 | /* Exported macro ------------------------------------------------------------*/ 45 | /* Exported functions --------------------------------------------------------*/ 46 | /** @addtogroup LTDCEx_Exported_Functions 47 | * @{ 48 | */ 49 | 50 | /** @addtogroup LTDCEx_Exported_Functions_Group1 51 | * @{ 52 | */ 53 | HAL_StatusTypeDef HAL_LTDCEx_StructInitFromVideoConfig(LTDC_HandleTypeDef *hltdc, DSI_VidCfgTypeDef *VidCfg); 54 | HAL_StatusTypeDef HAL_LTDCEx_StructInitFromAdaptedCommandConfig(LTDC_HandleTypeDef *hltdc, DSI_CmdCfgTypeDef *CmdCfg); 55 | /** 56 | * @} 57 | */ 58 | 59 | /** 60 | * @} 61 | */ 62 | 63 | /* Private types -------------------------------------------------------------*/ 64 | /* Private variables ---------------------------------------------------------*/ 65 | /* Private constants ---------------------------------------------------------*/ 66 | /* Private macros ------------------------------------------------------------*/ 67 | /* Private functions ---------------------------------------------------------*/ 68 | 69 | /** 70 | * @} 71 | */ 72 | 73 | /** 74 | * @} 75 | */ 76 | 77 | #endif /* LTDC && DSI */ 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | 83 | #endif /* STM32F4xx_HAL_LTDC_EX_H */ 84 | -------------------------------------------------------------------------------- /Drivers/STM32F4xx_HAL_Driver/LICENSE.txt: -------------------------------------------------------------------------------- 1 | This software component is provided to you as part of a software package and 2 | applicable license terms are in the Package_license file. If you received this 3 | software component outside of a package or without applicable license terms, 4 | the terms of the BSD-3-Clause license shall apply. 5 | You may obtain a copy of the BSD-3-Clause at: 6 | https://opensource.org/licenses/BSD-3-Clause 7 | -------------------------------------------------------------------------------- /Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_hal_flash_ramfunc.c 4 | * @author MCD Application Team 5 | * @brief FLASH RAMFUNC module driver. 6 | * This file provides a FLASH firmware functions which should be 7 | * executed from internal SRAM 8 | * + Stop/Start the flash interface while System Run 9 | * + Enable/Disable the flash sleep while System Run 10 | @verbatim 11 | ============================================================================== 12 | ##### APIs executed from Internal RAM ##### 13 | ============================================================================== 14 | [..] 15 | *** ARM Compiler *** 16 | -------------------- 17 | [..] RAM functions are defined using the toolchain options. 18 | Functions that are be executed in RAM should reside in a separate 19 | source module. Using the 'Options for File' dialog you can simply change 20 | the 'Code / Const' area of a module to a memory space in physical RAM. 21 | Available memory areas are declared in the 'Target' tab of the 22 | Options for Target' dialog. 23 | 24 | *** ICCARM Compiler *** 25 | ----------------------- 26 | [..] RAM functions are defined using a specific toolchain keyword "__ramfunc". 27 | 28 | *** GNU Compiler *** 29 | -------------------- 30 | [..] RAM functions are defined using a specific toolchain attribute 31 | "__attribute__((section(".RamFunc")))". 32 | 33 | @endverbatim 34 | ****************************************************************************** 35 | * @attention 36 | * 37 | * Copyright (c) 2017 STMicroelectronics. 38 | * All rights reserved. 39 | * 40 | * This software is licensed under terms that can be found in the LICENSE file in 41 | * the root directory of this software component. 42 | * If no LICENSE file comes with this software, it is provided AS-IS. 43 | ****************************************************************************** 44 | */ 45 | 46 | /* Includes ------------------------------------------------------------------*/ 47 | #include "stm32f4xx_hal.h" 48 | 49 | /** @addtogroup STM32F4xx_HAL_Driver 50 | * @{ 51 | */ 52 | 53 | /** @defgroup FLASH_RAMFUNC FLASH RAMFUNC 54 | * @brief FLASH functions executed from RAM 55 | * @{ 56 | */ 57 | #ifdef HAL_FLASH_MODULE_ENABLED 58 | #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \ 59 | defined(STM32F412Rx) || defined(STM32F412Cx) 60 | 61 | /* Private typedef -----------------------------------------------------------*/ 62 | /* Private define ------------------------------------------------------------*/ 63 | /* Private macro -------------------------------------------------------------*/ 64 | /* Private variables ---------------------------------------------------------*/ 65 | /* Private function prototypes -----------------------------------------------*/ 66 | /* Exported functions --------------------------------------------------------*/ 67 | /** @defgroup FLASH_RAMFUNC_Exported_Functions FLASH RAMFUNC Exported Functions 68 | * @{ 69 | */ 70 | 71 | /** @defgroup FLASH_RAMFUNC_Exported_Functions_Group1 Peripheral features functions executed from internal RAM 72 | * @brief Peripheral Extended features functions 73 | * 74 | @verbatim 75 | 76 | =============================================================================== 77 | ##### ramfunc functions ##### 78 | =============================================================================== 79 | [..] 80 | This subsection provides a set of functions that should be executed from RAM 81 | transfers. 82 | 83 | @endverbatim 84 | * @{ 85 | */ 86 | 87 | /** 88 | * @brief Stop the flash interface while System Run 89 | * @note This mode is only available for STM32F41xxx/STM32F446xx devices. 90 | * @note This mode couldn't be set while executing with the flash itself. 91 | * It should be done with specific routine executed from RAM. 92 | * @retval HAL status 93 | */ 94 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StopFlashInterfaceClk(void) 95 | { 96 | /* Enable Power ctrl clock */ 97 | __HAL_RCC_PWR_CLK_ENABLE(); 98 | /* Stop the flash interface while System Run */ 99 | SET_BIT(PWR->CR, PWR_CR_FISSR); 100 | 101 | return HAL_OK; 102 | } 103 | 104 | /** 105 | * @brief Start the flash interface while System Run 106 | * @note This mode is only available for STM32F411xx/STM32F446xx devices. 107 | * @note This mode couldn't be set while executing with the flash itself. 108 | * It should be done with specific routine executed from RAM. 109 | * @retval HAL status 110 | */ 111 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StartFlashInterfaceClk(void) 112 | { 113 | /* Enable Power ctrl clock */ 114 | __HAL_RCC_PWR_CLK_ENABLE(); 115 | /* Start the flash interface while System Run */ 116 | CLEAR_BIT(PWR->CR, PWR_CR_FISSR); 117 | 118 | return HAL_OK; 119 | } 120 | 121 | /** 122 | * @brief Enable the flash sleep while System Run 123 | * @note This mode is only available for STM32F41xxx/STM32F446xx devices. 124 | * @note This mode could n't be set while executing with the flash itself. 125 | * It should be done with specific routine executed from RAM. 126 | * @retval HAL status 127 | */ 128 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableFlashSleepMode(void) 129 | { 130 | /* Enable Power ctrl clock */ 131 | __HAL_RCC_PWR_CLK_ENABLE(); 132 | /* Enable the flash sleep while System Run */ 133 | SET_BIT(PWR->CR, PWR_CR_FMSSR); 134 | 135 | return HAL_OK; 136 | } 137 | 138 | /** 139 | * @brief Disable the flash sleep while System Run 140 | * @note This mode is only available for STM32F41xxx/STM32F446xx devices. 141 | * @note This mode couldn't be set while executing with the flash itself. 142 | * It should be done with specific routine executed from RAM. 143 | * @retval HAL status 144 | */ 145 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void) 146 | { 147 | /* Enable Power ctrl clock */ 148 | __HAL_RCC_PWR_CLK_ENABLE(); 149 | /* Disable the flash sleep while System Run */ 150 | CLEAR_BIT(PWR->CR, PWR_CR_FMSSR); 151 | 152 | return HAL_OK; 153 | } 154 | 155 | /** 156 | * @} 157 | */ 158 | 159 | /** 160 | * @} 161 | */ 162 | 163 | #endif /* STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */ 164 | #endif /* HAL_FLASH_MODULE_ENABLED */ 165 | /** 166 | * @} 167 | */ 168 | 169 | /** 170 | * @} 171 | */ 172 | 173 | -------------------------------------------------------------------------------- /Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_hal_i2c_ex.c 4 | * @author MCD Application Team 5 | * @brief I2C Extension HAL module driver. 6 | * This file provides firmware functions to manage the following 7 | * functionalities of I2C extension peripheral: 8 | * + Extension features functions 9 | * 10 | ****************************************************************************** 11 | * @attention 12 | * 13 | * Copyright (c) 2016 STMicroelectronics. 14 | * All rights reserved. 15 | * 16 | * This software is licensed under terms that can be found in the LICENSE file 17 | * in the root directory of this software component. 18 | * If no LICENSE file comes with this software, it is provided AS-IS. 19 | * 20 | ****************************************************************************** 21 | @verbatim 22 | ============================================================================== 23 | ##### I2C peripheral extension features ##### 24 | ============================================================================== 25 | 26 | [..] Comparing to other previous devices, the I2C interface for STM32F427xx/437xx/ 27 | 429xx/439xx devices contains the following additional features : 28 | 29 | (+) Possibility to disable or enable Analog Noise Filter 30 | (+) Use of a configured Digital Noise Filter 31 | 32 | ##### How to use this driver ##### 33 | ============================================================================== 34 | [..] This driver provides functions to configure Noise Filter 35 | (#) Configure I2C Analog noise filter using the function HAL_I2C_AnalogFilter_Config() 36 | (#) Configure I2C Digital noise filter using the function HAL_I2C_DigitalFilter_Config() 37 | 38 | @endverbatim 39 | */ 40 | 41 | /* Includes ------------------------------------------------------------------*/ 42 | #include "stm32f4xx_hal.h" 43 | 44 | /** @addtogroup STM32F4xx_HAL_Driver 45 | * @{ 46 | */ 47 | 48 | /** @defgroup I2CEx I2CEx 49 | * @brief I2C HAL module driver 50 | * @{ 51 | */ 52 | 53 | #ifdef HAL_I2C_MODULE_ENABLED 54 | 55 | #if defined(I2C_FLTR_ANOFF)&&defined(I2C_FLTR_DNF) 56 | /* Private typedef -----------------------------------------------------------*/ 57 | /* Private define ------------------------------------------------------------*/ 58 | /* Private macro -------------------------------------------------------------*/ 59 | /* Private variables ---------------------------------------------------------*/ 60 | /* Private function prototypes -----------------------------------------------*/ 61 | /* Exported functions --------------------------------------------------------*/ 62 | /** @defgroup I2CEx_Exported_Functions I2C Exported Functions 63 | * @{ 64 | */ 65 | 66 | 67 | /** @defgroup I2CEx_Exported_Functions_Group1 Extension features functions 68 | * @brief Extension features functions 69 | * 70 | @verbatim 71 | =============================================================================== 72 | ##### Extension features functions ##### 73 | =============================================================================== 74 | [..] This section provides functions allowing to: 75 | (+) Configure Noise Filters 76 | 77 | @endverbatim 78 | * @{ 79 | */ 80 | 81 | /** 82 | * @brief Configures I2C Analog noise filter. 83 | * @param hi2c pointer to a I2C_HandleTypeDef structure that contains 84 | * the configuration information for the specified I2Cx peripheral. 85 | * @param AnalogFilter new state of the Analog filter. 86 | * @retval HAL status 87 | */ 88 | HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter) 89 | { 90 | /* Check the parameters */ 91 | assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance)); 92 | assert_param(IS_I2C_ANALOG_FILTER(AnalogFilter)); 93 | 94 | if (hi2c->State == HAL_I2C_STATE_READY) 95 | { 96 | hi2c->State = HAL_I2C_STATE_BUSY; 97 | 98 | /* Disable the selected I2C peripheral */ 99 | __HAL_I2C_DISABLE(hi2c); 100 | 101 | /* Reset I2Cx ANOFF bit */ 102 | hi2c->Instance->FLTR &= ~(I2C_FLTR_ANOFF); 103 | 104 | /* Disable the analog filter */ 105 | hi2c->Instance->FLTR |= AnalogFilter; 106 | 107 | __HAL_I2C_ENABLE(hi2c); 108 | 109 | hi2c->State = HAL_I2C_STATE_READY; 110 | 111 | return HAL_OK; 112 | } 113 | else 114 | { 115 | return HAL_BUSY; 116 | } 117 | } 118 | 119 | /** 120 | * @brief Configures I2C Digital noise filter. 121 | * @param hi2c pointer to a I2C_HandleTypeDef structure that contains 122 | * the configuration information for the specified I2Cx peripheral. 123 | * @param DigitalFilter Coefficient of digital noise filter between 0x00 and 0x0F. 124 | * @retval HAL status 125 | */ 126 | HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter) 127 | { 128 | uint16_t tmpreg = 0; 129 | 130 | /* Check the parameters */ 131 | assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance)); 132 | assert_param(IS_I2C_DIGITAL_FILTER(DigitalFilter)); 133 | 134 | if (hi2c->State == HAL_I2C_STATE_READY) 135 | { 136 | hi2c->State = HAL_I2C_STATE_BUSY; 137 | 138 | /* Disable the selected I2C peripheral */ 139 | __HAL_I2C_DISABLE(hi2c); 140 | 141 | /* Get the old register value */ 142 | tmpreg = hi2c->Instance->FLTR; 143 | 144 | /* Reset I2Cx DNF bit [3:0] */ 145 | tmpreg &= ~(I2C_FLTR_DNF); 146 | 147 | /* Set I2Cx DNF coefficient */ 148 | tmpreg |= DigitalFilter; 149 | 150 | /* Store the new register value */ 151 | hi2c->Instance->FLTR = tmpreg; 152 | 153 | __HAL_I2C_ENABLE(hi2c); 154 | 155 | hi2c->State = HAL_I2C_STATE_READY; 156 | 157 | return HAL_OK; 158 | } 159 | else 160 | { 161 | return HAL_BUSY; 162 | } 163 | } 164 | 165 | /** 166 | * @} 167 | */ 168 | 169 | /** 170 | * @} 171 | */ 172 | #endif 173 | 174 | #endif /* HAL_I2C_MODULE_ENABLED */ 175 | /** 176 | * @} 177 | */ 178 | 179 | /** 180 | * @} 181 | */ 182 | 183 | -------------------------------------------------------------------------------- /Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc_ex.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_hal_ltdc_ex.c 4 | * @author MCD Application Team 5 | * @brief LTDC Extension HAL module driver. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file 13 | * in the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | * 16 | ****************************************************************************** 17 | */ 18 | 19 | /* Includes ------------------------------------------------------------------*/ 20 | #include "stm32f4xx_hal.h" 21 | 22 | /** @addtogroup STM32F4xx_HAL_Driver 23 | * @{ 24 | */ 25 | 26 | #if defined(HAL_LTDC_MODULE_ENABLED) && defined(HAL_DSI_MODULE_ENABLED) 27 | 28 | #if defined (LTDC) && defined (DSI) 29 | 30 | /** @defgroup LTDCEx LTDCEx 31 | * @brief LTDC HAL module driver 32 | * @{ 33 | */ 34 | 35 | /* Private typedef -----------------------------------------------------------*/ 36 | /* Private define ------------------------------------------------------------*/ 37 | /* Private macro -------------------------------------------------------------*/ 38 | /* Private variables ---------------------------------------------------------*/ 39 | /* Private function prototypes -----------------------------------------------*/ 40 | /* Exported functions --------------------------------------------------------*/ 41 | 42 | /** @defgroup LTDCEx_Exported_Functions LTDC Extended Exported Functions 43 | * @{ 44 | */ 45 | 46 | /** @defgroup LTDCEx_Exported_Functions_Group1 Initialization and Configuration functions 47 | * @brief Initialization and Configuration functions 48 | * 49 | @verbatim 50 | =============================================================================== 51 | ##### Initialization and Configuration functions ##### 52 | =============================================================================== 53 | [..] This section provides functions allowing to: 54 | (+) Initialize and configure the LTDC 55 | 56 | @endverbatim 57 | * @{ 58 | */ 59 | 60 | /** 61 | * @brief Retrieve common parameters from DSI Video mode configuration structure 62 | * @param hltdc pointer to a LTDC_HandleTypeDef structure that contains 63 | * the configuration information for the LTDC. 64 | * @param VidCfg pointer to a DSI_VidCfgTypeDef structure that contains 65 | * the DSI video mode configuration parameters 66 | * @note The implementation of this function is taking into account the LTDC 67 | * polarities inversion as described in the current LTDC specification 68 | * @retval HAL status 69 | */ 70 | HAL_StatusTypeDef HAL_LTDCEx_StructInitFromVideoConfig(LTDC_HandleTypeDef *hltdc, DSI_VidCfgTypeDef *VidCfg) 71 | { 72 | /* Retrieve signal polarities from DSI */ 73 | 74 | /* The following polarity is inverted: 75 | LTDC_DEPOLARITY_AL <-> LTDC_DEPOLARITY_AH */ 76 | 77 | /* Note 1 : Code in line w/ Current LTDC specification */ 78 | hltdc->Init.DEPolarity = (VidCfg->DEPolarity == \ 79 | DSI_DATA_ENABLE_ACTIVE_HIGH) ? LTDC_DEPOLARITY_AL : LTDC_DEPOLARITY_AH; 80 | hltdc->Init.VSPolarity = (VidCfg->VSPolarity == DSI_VSYNC_ACTIVE_HIGH) ? LTDC_VSPOLARITY_AH : LTDC_VSPOLARITY_AL; 81 | hltdc->Init.HSPolarity = (VidCfg->HSPolarity == DSI_HSYNC_ACTIVE_HIGH) ? LTDC_HSPOLARITY_AH : LTDC_HSPOLARITY_AL; 82 | 83 | /* Note 2: Code to be used in case LTDC polarities inversion updated in the specification */ 84 | /* hltdc->Init.DEPolarity = VidCfg->DEPolarity << 29; 85 | hltdc->Init.VSPolarity = VidCfg->VSPolarity << 29; 86 | hltdc->Init.HSPolarity = VidCfg->HSPolarity << 29; */ 87 | 88 | /* Retrieve vertical timing parameters from DSI */ 89 | hltdc->Init.VerticalSync = VidCfg->VerticalSyncActive - 1U; 90 | hltdc->Init.AccumulatedVBP = VidCfg->VerticalSyncActive + VidCfg->VerticalBackPorch - 1U; 91 | hltdc->Init.AccumulatedActiveH = VidCfg->VerticalSyncActive + VidCfg->VerticalBackPorch + \ 92 | VidCfg->VerticalActive - 1U; 93 | hltdc->Init.TotalHeigh = VidCfg->VerticalSyncActive + VidCfg->VerticalBackPorch + \ 94 | VidCfg->VerticalActive + VidCfg->VerticalFrontPorch - 1U; 95 | 96 | return HAL_OK; 97 | } 98 | 99 | /** 100 | * @brief Retrieve common parameters from DSI Adapted command mode configuration structure 101 | * @param hltdc pointer to a LTDC_HandleTypeDef structure that contains 102 | * the configuration information for the LTDC. 103 | * @param CmdCfg pointer to a DSI_CmdCfgTypeDef structure that contains 104 | * the DSI command mode configuration parameters 105 | * @note The implementation of this function is taking into account the LTDC 106 | * polarities inversion as described in the current LTDC specification 107 | * @retval HAL status 108 | */ 109 | HAL_StatusTypeDef HAL_LTDCEx_StructInitFromAdaptedCommandConfig(LTDC_HandleTypeDef *hltdc, DSI_CmdCfgTypeDef *CmdCfg) 110 | { 111 | /* Retrieve signal polarities from DSI */ 112 | 113 | /* The following polarities are inverted: 114 | LTDC_DEPOLARITY_AL <-> LTDC_DEPOLARITY_AH 115 | LTDC_VSPOLARITY_AL <-> LTDC_VSPOLARITY_AH 116 | LTDC_HSPOLARITY_AL <-> LTDC_HSPOLARITY_AH)*/ 117 | 118 | /* Note 1 : Code in line w/ Current LTDC specification */ 119 | hltdc->Init.DEPolarity = (CmdCfg->DEPolarity == \ 120 | DSI_DATA_ENABLE_ACTIVE_HIGH) ? LTDC_DEPOLARITY_AL : LTDC_DEPOLARITY_AH; 121 | hltdc->Init.VSPolarity = (CmdCfg->VSPolarity == DSI_VSYNC_ACTIVE_HIGH) ? LTDC_VSPOLARITY_AL : LTDC_VSPOLARITY_AH; 122 | hltdc->Init.HSPolarity = (CmdCfg->HSPolarity == DSI_HSYNC_ACTIVE_HIGH) ? LTDC_HSPOLARITY_AL : LTDC_HSPOLARITY_AH; 123 | 124 | /* Note 2: Code to be used in case LTDC polarities inversion updated in the specification */ 125 | /* hltdc->Init.DEPolarity = CmdCfg->DEPolarity << 29; 126 | hltdc->Init.VSPolarity = CmdCfg->VSPolarity << 29; 127 | hltdc->Init.HSPolarity = CmdCfg->HSPolarity << 29; */ 128 | 129 | return HAL_OK; 130 | } 131 | 132 | /** 133 | * @} 134 | */ 135 | 136 | /** 137 | * @} 138 | */ 139 | 140 | /** 141 | * @} 142 | */ 143 | 144 | #endif /* LTDC && DSI */ 145 | 146 | #endif /* HAL_LTCD_MODULE_ENABLED && HAL_DSI_MODULE_ENABLED */ 147 | 148 | /** 149 | * @} 150 | */ 151 | 152 | -------------------------------------------------------------------------------- /Drivers/hal_stm_lvgl/screen_driver.c: -------------------------------------------------------------------------------- 1 | /* 2 | * screen.c 3 | * 4 | * Created on: Feb 16, 2023 5 | * Author: morgan 6 | */ 7 | 8 | #include "main.h" 9 | #include "stm32469i_discovery_lcd.h" 10 | #include 11 | #include 12 | #include 13 | 14 | #define MIN(a, b) ((a) < (b) ? (a) : (b)) 15 | 16 | #define LCD_SCREEN_WIDTH NT35510_480X800_HEIGHT 17 | #define LCD_SCREEN_HEIGHT NT35510_480X800_WIDTH 18 | #define FRAMEBUFFER_SIZE (uint32_t)LCD_SCREEN_HEIGHT*LCD_SCREEN_WIDTH 19 | #define DMA_XFERS_NEEDED FRAMEBUFFER_SIZE/2 // We need half as many transfers because the buffer is an array of 20 | // 16 bits but the transfers are 32 bits. 21 | 22 | /* 23 | * Handles to peripherals 24 | */ 25 | extern DSI_HandleTypeDef hdsi; // From main.c 26 | extern LTDC_HandleTypeDef hltdc; 27 | extern DMA_HandleTypeDef hdma_memtomem_dma2_stream0; 28 | extern DMA2D_HandleTypeDef hdma2d; 29 | /* 30 | * Global variables 31 | */ 32 | lv_disp_drv_t lv_display_driver; 33 | __attribute__ ( (section(".framebuffer"))) lv_color_t framebuffer_1[FRAMEBUFFER_SIZE]; 34 | __attribute__ ( (section(".framebuffer"))) lv_color_t framebuffer_2[FRAMEBUFFER_SIZE]; 35 | 36 | /* 37 | * Private functions prototypes 38 | */ 39 | void stm32_flush_cb(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p); 40 | void dma2d_copy_area(lv_area_t area, uint32_t src_buffer, uint32_t dst_buffer); 41 | 42 | /* 43 | * Public functions definitions 44 | */ 45 | 46 | void screen_driver_init(){ 47 | 48 | BSP_LCD_Init() ; 49 | BSP_LCD_LayerDefaultInit(0, (uint32_t)framebuffer_1); 50 | 51 | static lv_disp_draw_buf_t draw_buf; 52 | lv_disp_draw_buf_init(&draw_buf, framebuffer_1, framebuffer_2, FRAMEBUFFER_SIZE); 53 | lv_disp_drv_init(&lv_display_driver); 54 | lv_display_driver.direct_mode = true; 55 | lv_display_driver.hor_res = NT35510_480X800_HEIGHT; 56 | lv_display_driver.ver_res = NT35510_480X800_WIDTH; 57 | lv_display_driver.flush_cb = stm32_flush_cb; 58 | lv_display_driver.draw_buf = &draw_buf; 59 | 60 | lv_disp_drv_register(&lv_display_driver); 61 | } 62 | 63 | /* 64 | * Private functions definitions 65 | */ 66 | void stm32_flush_cb(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p){ 67 | lv_disp_t *disp = _lv_refr_get_disp_refreshing(); 68 | uint16_t *dma_xfer_src, *dma_xfer_dst; 69 | if(!lv_disp_flush_is_last(disp_drv)){ 70 | lv_disp_flush_ready(disp_drv); 71 | return; 72 | } 73 | 74 | // Swap the buffer for the one to display and reload the screen at the next vertical blanking 75 | HAL_LTDC_SetAddress_NoReload(&hltdc, (uint32_t)color_p, 0); 76 | HAL_LTDC_Reload(&hltdc, LTDC_RELOAD_VERTICAL_BLANKING); // VSYNC 77 | 78 | // Determine source and destination of transfer 79 | dma_xfer_src = (uint16_t *)color_p; 80 | if(color_p == framebuffer_1){ 81 | dma_xfer_dst = (uint16_t *)framebuffer_2; 82 | }else{ 83 | dma_xfer_dst = (uint16_t *)framebuffer_1; 84 | } 85 | 86 | for(size_t i = 0; i < disp->inv_p; i++){ 87 | // If the area was not joined (and thus should not be ignored) 88 | if(!disp->inv_area_joined[i]){ 89 | dma2d_copy_area(disp->inv_areas[i], (uint32_t)dma_xfer_src, (uint32_t)dma_xfer_dst); 90 | } 91 | } 92 | 93 | lv_disp_flush_ready(disp_drv); 94 | } 95 | 96 | void dma2d_copy_area(lv_area_t area, uint32_t src_buffer, uint32_t dst_buffer){ 97 | size_t start_offset = (LCD_SCREEN_WIDTH*(area.y1) + (area.x1))*2; // address offset (not pixel offset so it is multiplied by 2) 98 | size_t area_width = 1 + area.x2 - area.x1; 99 | size_t area_height = 1 + area.y2 - area.y1; 100 | size_t in_out_offset = LCD_SCREEN_WIDTH - area_width; 101 | 102 | // Set up DMA2D to transfer parts of picture to part of picture 103 | hdma2d.Init.Mode = DMA2D_M2M; // plain memory to memory 104 | hdma2d.Init.ColorMode = DMA2D_OUTPUT_RGB565; 105 | hdma2d.Init.OutputOffset = in_out_offset; // nb pixels in buffer between end of area line and start of next area line 106 | hdma2d.LayerCfg[DMA2D_FOREGROUND_LAYER].InputColorMode = DMA2D_INPUT_RGB565; 107 | hdma2d.LayerCfg[DMA2D_FOREGROUND_LAYER].InputOffset = in_out_offset; 108 | hdma2d.LayerCfg[DMA2D_FOREGROUND_LAYER].AlphaMode = DMA2D_NO_MODIF_ALPHA; 109 | hdma2d.LayerCfg[DMA2D_FOREGROUND_LAYER].InputAlpha = 0; 110 | 111 | HAL_DMA2D_Init(&hdma2d); 112 | HAL_DMA2D_ConfigLayer(&hdma2d, DMA2D_FOREGROUND_LAYER); 113 | HAL_DMA2D_Start(&hdma2d, src_buffer + start_offset, dst_buffer + start_offset, area_width, area_height); // Start transfer 114 | HAL_DMA2D_PollForTransfer(&hdma2d, 10000); // Wait for transfer to be over 115 | } 116 | -------------------------------------------------------------------------------- /Drivers/hal_stm_lvgl/screen_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * screen_driver.h 3 | * 4 | * Created on: Feb 16, 2023 5 | * Author: morgan 6 | */ 7 | 8 | #ifndef SCREEN_DRIVER_H_ 9 | #define SCREEN_DRIVER_H_ 10 | 11 | void screen_driver_init(); 12 | 13 | #endif /* SCREEN_DRIVER_H_ */ 14 | -------------------------------------------------------------------------------- /Drivers/hal_stm_lvgl/touch_sensor_driver.c: -------------------------------------------------------------------------------- 1 | /* 2 | * touch_sensor_driver.c 3 | * 4 | * Created on: 19 févr. 2023 5 | * Author: morga 6 | */ 7 | 8 | #include "main.h" 9 | #include "stm32469i_discovery_lcd.h" 10 | #include "stm32469i_discovery_ts.h" 11 | #include 12 | #include 13 | #include 14 | 15 | static void stm32_touchpad_read_cb(lv_indev_drv_t *indev_drv, lv_indev_data_t *indev_data); 16 | 17 | void touch_sensor_driver_init(){ 18 | 19 | BSP_TS_Init(NT35510_800X480_WIDTH, NT35510_800X480_HEIGHT); 20 | static lv_indev_drv_t indev_drv; 21 | lv_indev_drv_init(&indev_drv); 22 | 23 | indev_drv.type = LV_INDEV_TYPE_POINTER; 24 | indev_drv.read_cb = stm32_touchpad_read_cb; 25 | 26 | lv_indev_drv_register(&indev_drv); 27 | } 28 | 29 | static void stm32_touchpad_read_cb(lv_indev_drv_t *indev_drv, lv_indev_data_t *indev_data){ 30 | static int16_t last_x = 0; 31 | static int16_t last_y = 0; 32 | 33 | TS_StateTypeDef TS_State; 34 | 35 | BSP_TS_GetState(&TS_State); 36 | if(TS_State.touchDetected){ 37 | indev_data->point.x = TS_State.touchX[0]; 38 | indev_data->point.y = TS_State.touchY[0]; 39 | indev_data->state = LV_INDEV_STATE_PRESSED; 40 | last_x = indev_data->point.x; 41 | last_y = indev_data->point.y; 42 | }else{ 43 | indev_data->point.x = last_x; 44 | indev_data->point.y = last_y; 45 | indev_data->state = LV_INDEV_STATE_RELEASED; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Drivers/hal_stm_lvgl/touch_sensor_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * touch_sensor_driver.h 3 | * 4 | * Created on: 19 févr. 2023 5 | * Author: morga 6 | */ 7 | 8 | #ifndef HAL_STM_LVGL_TOUCH_SENSOR_DRIVER_H_ 9 | #define HAL_STM_LVGL_TOUCH_SENSOR_DRIVER_H_ 10 | 11 | void touch_sensor_driver_init(); 12 | 13 | 14 | #endif /* HAL_STM_LVGL_TOUCH_SENSOR_DRIVER_H_ */ 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LVGL_Port 2 | -------------------------------------------------------------------------------- /STM32F469NIHX_FLASH.ld: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************************** 3 | ** 4 | ** @file : LinkerScript.ld 5 | ** 6 | ** @author : Auto-generated by STM32CubeIDE 7 | ** 8 | ** Abstract : Linker script for STM32F469I-DISCO Board embedding STM32F469NIHx Device from stm32f4 series 9 | ** 2048Kbytes FLASH 10 | ** 64Kbytes CCMRAM 11 | ** 320Kbytes RAM 12 | ** 13 | ** Set heap size, stack size and stack location according 14 | ** to application requirements. 15 | ** 16 | ** Set memory bank area and size if external memory is used 17 | ** 18 | ** Target : STMicroelectronics STM32 19 | ** 20 | ** Distribution: The file is distributed as is, without any warranty 21 | ** of any kind. 22 | ** 23 | ****************************************************************************** 24 | ** @attention 25 | ** 26 | ** Copyright (c) 2023 STMicroelectronics. 27 | ** All rights reserved. 28 | ** 29 | ** This software is licensed under terms that can be found in the LICENSE file 30 | ** in the root directory of this software component. 31 | ** If no LICENSE file comes with this software, it is provided AS-IS. 32 | ** 33 | ****************************************************************************** 34 | */ 35 | 36 | /* Entry Point */ 37 | ENTRY(Reset_Handler) 38 | 39 | /* Highest address of the user mode stack */ 40 | _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ 41 | 42 | _Min_Heap_Size = 0x200; /* required amount of heap */ 43 | _Min_Stack_Size = 0x400; /* required amount of stack */ 44 | 45 | /* Memories definition */ 46 | MEMORY 47 | { 48 | CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K 49 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K 50 | FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K 51 | SDRAM (rw) : ORIGIN = 0xC0000000, LENGTH = 16M 52 | } 53 | 54 | /* Sections */ 55 | SECTIONS 56 | { 57 | /* The startup code into "FLASH" Rom type memory */ 58 | .isr_vector : 59 | { 60 | . = ALIGN(4); 61 | KEEP(*(.isr_vector)) /* Startup code */ 62 | . = ALIGN(4); 63 | } >FLASH 64 | 65 | /* The program code and other data into "FLASH" Rom type memory */ 66 | .text : 67 | { 68 | . = ALIGN(4); 69 | *(.text) /* .text sections (code) */ 70 | *(.text*) /* .text* sections (code) */ 71 | *(.glue_7) /* glue arm to thumb code */ 72 | *(.glue_7t) /* glue thumb to arm code */ 73 | *(.eh_frame) 74 | 75 | KEEP (*(.init)) 76 | KEEP (*(.fini)) 77 | 78 | . = ALIGN(4); 79 | _etext = .; /* define a global symbols at end of code */ 80 | } >FLASH 81 | 82 | /* Constant data into "FLASH" Rom type memory */ 83 | .rodata : 84 | { 85 | . = ALIGN(4); 86 | *(.rodata) /* .rodata sections (constants, strings, etc.) */ 87 | *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ 88 | . = ALIGN(4); 89 | } >FLASH 90 | 91 | .ARM.extab : { 92 | . = ALIGN(4); 93 | *(.ARM.extab* .gnu.linkonce.armextab.*) 94 | . = ALIGN(4); 95 | } >FLASH 96 | 97 | .ARM : { 98 | . = ALIGN(4); 99 | __exidx_start = .; 100 | *(.ARM.exidx*) 101 | __exidx_end = .; 102 | . = ALIGN(4); 103 | } >FLASH 104 | 105 | .preinit_array : 106 | { 107 | . = ALIGN(4); 108 | PROVIDE_HIDDEN (__preinit_array_start = .); 109 | KEEP (*(.preinit_array*)) 110 | PROVIDE_HIDDEN (__preinit_array_end = .); 111 | . = ALIGN(4); 112 | } >FLASH 113 | 114 | .init_array : 115 | { 116 | . = ALIGN(4); 117 | PROVIDE_HIDDEN (__init_array_start = .); 118 | KEEP (*(SORT(.init_array.*))) 119 | KEEP (*(.init_array*)) 120 | PROVIDE_HIDDEN (__init_array_end = .); 121 | . = ALIGN(4); 122 | } >FLASH 123 | 124 | .fini_array : 125 | { 126 | . = ALIGN(4); 127 | PROVIDE_HIDDEN (__fini_array_start = .); 128 | KEEP (*(SORT(.fini_array.*))) 129 | KEEP (*(.fini_array*)) 130 | PROVIDE_HIDDEN (__fini_array_end = .); 131 | . = ALIGN(4); 132 | } >FLASH 133 | 134 | /* Used by the startup to initialize data */ 135 | _sidata = LOADADDR(.data); 136 | 137 | /* Initialized data sections into "RAM" Ram type memory */ 138 | .data : 139 | { 140 | . = ALIGN(4); 141 | _sdata = .; /* create a global symbol at data start */ 142 | *(.data) /* .data sections */ 143 | *(.data*) /* .data* sections */ 144 | *(.RamFunc) /* .RamFunc sections */ 145 | *(.RamFunc*) /* .RamFunc* sections */ 146 | 147 | . = ALIGN(4); 148 | _edata = .; /* define a global symbol at data end */ 149 | 150 | } >RAM AT> FLASH 151 | 152 | _siccmram = LOADADDR(.ccmram); 153 | 154 | /* CCM-RAM section 155 | * 156 | * IMPORTANT NOTE! 157 | * If initialized variables will be placed in this section, 158 | * the startup code needs to be modified to copy the init-values. 159 | */ 160 | .ccmram : 161 | { 162 | . = ALIGN(4); 163 | _sccmram = .; /* create a global symbol at ccmram start */ 164 | *(.ccmram) 165 | *(.ccmram*) 166 | 167 | . = ALIGN(4); 168 | _eccmram = .; /* create a global symbol at ccmram end */ 169 | } >CCMRAM AT> FLASH 170 | 171 | /* Uninitialized data section into "RAM" Ram type memory */ 172 | . = ALIGN(4); 173 | .bss : 174 | { 175 | /* This is used by the startup in order to initialize the .bss section */ 176 | _sbss = .; /* define a global symbol at bss start */ 177 | __bss_start__ = _sbss; 178 | *(.bss) 179 | *(.bss*) 180 | *(COMMON) 181 | 182 | . = ALIGN(4); 183 | _ebss = .; /* define a global symbol at bss end */ 184 | __bss_end__ = _ebss; 185 | } >RAM 186 | 187 | /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ 188 | ._user_heap_stack : 189 | { 190 | . = ALIGN(8); 191 | PROVIDE ( end = . ); 192 | PROVIDE ( _end = . ); 193 | . = . + _Min_Heap_Size; 194 | . = . + _Min_Stack_Size; 195 | . = ALIGN(8); 196 | } >RAM 197 | 198 | /* External SDRAM memory */ 199 | .sdram_bank1 (NOLOAD) : 200 | { 201 | _ssdram = .; /* create a global symbol at ccmram start */ 202 | KEEP(*(.framebuffer)) /* Framebuffer must be placed at address 0xC0000000 */ 203 | /* so we place it before the rest of the data in sdram */ 204 | . = ALIGN(4); 205 | 206 | *(.sdram) 207 | *(.sdram*) 208 | 209 | . = ALIGN(4); 210 | _esdram = .; /* create a global symbol at ccmram end */ 211 | } >SDRAM 212 | 213 | /* Remove information from the compiler libraries */ 214 | /DISCARD/ : 215 | { 216 | libc.a ( * ) 217 | libm.a ( * ) 218 | libgcc.a ( * ) 219 | } 220 | 221 | .ARM.attributes 0 : { *(.ARM.attributes) } 222 | } 223 | -------------------------------------------------------------------------------- /STM32F469NIHX_RAM.ld: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************************** 3 | ** 4 | ** @file : LinkerScript.ld (debug in RAM dedicated) 5 | ** 6 | ** @author : Auto-generated by STM32CubeIDE 7 | ** 8 | ** Abstract : Linker script for STM32F469I-DISCO Board embedding STM32F469NIHx Device from stm32f4 series 9 | ** 2048Kbytes FLASH 10 | ** 64Kbytes CCMRAM 11 | ** 320Kbytes RAM 12 | ** 13 | ** Set heap size, stack size and stack location according 14 | ** to application requirements. 15 | ** 16 | ** Set memory bank area and size if external memory is used 17 | ** 18 | ** Target : STMicroelectronics STM32 19 | ** 20 | ** Distribution: The file is distributed as is, without any warranty 21 | ** of any kind. 22 | ** 23 | ****************************************************************************** 24 | ** @attention 25 | ** 26 | ** Copyright (c) 2023 STMicroelectronics. 27 | ** All rights reserved. 28 | ** 29 | ** This software is licensed under terms that can be found in the LICENSE file 30 | ** in the root directory of this software component. 31 | ** If no LICENSE file comes with this software, it is provided AS-IS. 32 | ** 33 | ****************************************************************************** 34 | */ 35 | 36 | /* Entry Point */ 37 | ENTRY(Reset_Handler) 38 | 39 | /* Highest address of the user mode stack */ 40 | _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ 41 | 42 | _Min_Heap_Size = 0x200; /* required amount of heap */ 43 | _Min_Stack_Size = 0x400; /* required amount of stack */ 44 | 45 | /* Memories definition */ 46 | MEMORY 47 | { 48 | CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K 49 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K 50 | FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K 51 | SDRAM (rw) : ORIGIN = 0xC0000000, LENGTH = 16M 52 | } 53 | 54 | /* Sections */ 55 | SECTIONS 56 | { 57 | /* The startup code into "RAM" Ram type memory */ 58 | .isr_vector : 59 | { 60 | . = ALIGN(4); 61 | KEEP(*(.isr_vector)) /* Startup code */ 62 | . = ALIGN(4); 63 | } >RAM 64 | 65 | /* The program code and other data into "RAM" Ram type memory */ 66 | .text : 67 | { 68 | . = ALIGN(4); 69 | *(.text) /* .text sections (code) */ 70 | *(.text*) /* .text* sections (code) */ 71 | *(.glue_7) /* glue arm to thumb code */ 72 | *(.glue_7t) /* glue thumb to arm code */ 73 | *(.eh_frame) 74 | *(.RamFunc) /* .RamFunc sections */ 75 | *(.RamFunc*) /* .RamFunc* sections */ 76 | 77 | KEEP (*(.init)) 78 | KEEP (*(.fini)) 79 | 80 | . = ALIGN(4); 81 | _etext = .; /* define a global symbols at end of code */ 82 | } >RAM 83 | 84 | /* Constant data into "RAM" Ram type memory */ 85 | .rodata : 86 | { 87 | . = ALIGN(4); 88 | *(.rodata) /* .rodata sections (constants, strings, etc.) */ 89 | *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ 90 | . = ALIGN(4); 91 | } >RAM 92 | 93 | .ARM.extab : { 94 | . = ALIGN(4); 95 | *(.ARM.extab* .gnu.linkonce.armextab.*) 96 | . = ALIGN(4); 97 | } >RAM 98 | 99 | .ARM : { 100 | . = ALIGN(4); 101 | __exidx_start = .; 102 | *(.ARM.exidx*) 103 | __exidx_end = .; 104 | . = ALIGN(4); 105 | } >RAM 106 | 107 | .preinit_array : 108 | { 109 | . = ALIGN(4); 110 | PROVIDE_HIDDEN (__preinit_array_start = .); 111 | KEEP (*(.preinit_array*)) 112 | PROVIDE_HIDDEN (__preinit_array_end = .); 113 | . = ALIGN(4); 114 | } >RAM 115 | 116 | .init_array : 117 | { 118 | . = ALIGN(4); 119 | PROVIDE_HIDDEN (__init_array_start = .); 120 | KEEP (*(SORT(.init_array.*))) 121 | KEEP (*(.init_array*)) 122 | PROVIDE_HIDDEN (__init_array_end = .); 123 | . = ALIGN(4); 124 | } >RAM 125 | 126 | .fini_array : 127 | { 128 | . = ALIGN(4); 129 | PROVIDE_HIDDEN (__fini_array_start = .); 130 | KEEP (*(SORT(.fini_array.*))) 131 | KEEP (*(.fini_array*)) 132 | PROVIDE_HIDDEN (__fini_array_end = .); 133 | . = ALIGN(4); 134 | } >RAM 135 | 136 | /* Used by the startup to initialize data */ 137 | _sidata = LOADADDR(.data); 138 | 139 | /* Initialized data sections into "RAM" Ram type memory */ 140 | .data : 141 | { 142 | . = ALIGN(4); 143 | _sdata = .; /* create a global symbol at data start */ 144 | *(.data) /* .data sections */ 145 | *(.data*) /* .data* sections */ 146 | 147 | . = ALIGN(4); 148 | _edata = .; /* define a global symbol at data end */ 149 | 150 | } >RAM 151 | 152 | _siccmram = LOADADDR(.ccmram); 153 | 154 | /* CCM-RAM section 155 | * 156 | * IMPORTANT NOTE! 157 | * If initialized variables will be placed in this section, 158 | * the startup code needs to be modified to copy the init-values. 159 | */ 160 | .ccmram : 161 | { 162 | . = ALIGN(4); 163 | _sccmram = .; /* create a global symbol at ccmram start */ 164 | *(.ccmram) 165 | *(.ccmram*) 166 | 167 | . = ALIGN(4); 168 | _eccmram = .; /* create a global symbol at ccmram end */ 169 | } >CCMRAM AT> RAM 170 | 171 | /* Uninitialized data section into "RAM" Ram type memory */ 172 | . = ALIGN(4); 173 | .bss : 174 | { 175 | /* This is used by the startup in order to initialize the .bss section */ 176 | _sbss = .; /* define a global symbol at bss start */ 177 | __bss_start__ = _sbss; 178 | *(.bss) 179 | *(.bss*) 180 | *(COMMON) 181 | 182 | . = ALIGN(4); 183 | _ebss = .; /* define a global symbol at bss end */ 184 | __bss_end__ = _ebss; 185 | } >RAM 186 | 187 | /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ 188 | ._user_heap_stack : 189 | { 190 | . = ALIGN(8); 191 | PROVIDE ( end = . ); 192 | PROVIDE ( _end = . ); 193 | . = . + _Min_Heap_Size; 194 | . = . + _Min_Stack_Size; 195 | . = ALIGN(8); 196 | } >RAM 197 | 198 | /* External SDRAM memory */ 199 | .sdram_bank1 (NOLOAD) : 200 | { 201 | _ssdram = .; /* create a global symbol at ccmram start */ 202 | KEEP(*(.framebuffer)) /* Framebuffer must be placed at address 0xC0000000 */ 203 | /* so we place it before the rest of the data in sdram */ 204 | . = ALIGN(4); 205 | 206 | *(.sdram) 207 | *(.sdram*) 208 | 209 | . = ALIGN(4); 210 | _esdram = .; /* create a global symbol at ccmram end */ 211 | } >SDRAM 212 | 213 | /* Remove information from the compiler libraries */ 214 | /DISCARD/ : 215 | { 216 | libc.a ( * ) 217 | libm.a ( * ) 218 | libgcc.a ( * ) 219 | } 220 | 221 | .ARM.attributes 0 : { *(.ARM.attributes) } 222 | } 223 | -------------------------------------------------------------------------------- /Utilities/Fonts/fonts.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file fonts.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 18-February-2014 7 | * @brief Header for fonts.c file 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2014 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ 39 | #ifndef __FONTS_H 40 | #define __FONTS_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /* Includes ------------------------------------------------------------------*/ 47 | #include 48 | 49 | /** @addtogroup Utilities 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup STM32_EVAL 54 | * @{ 55 | */ 56 | 57 | /** @addtogroup Common 58 | * @{ 59 | */ 60 | 61 | /** @addtogroup FONTS 62 | * @{ 63 | */ 64 | 65 | /** @defgroup FONTS_Exported_Types 66 | * @{ 67 | */ 68 | typedef struct _tFont 69 | { 70 | const uint8_t *table; 71 | uint16_t Width; 72 | uint16_t Height; 73 | 74 | } sFONT; 75 | 76 | extern sFONT Font24; 77 | extern sFONT Font20; 78 | extern sFONT Font16; 79 | extern sFONT Font12; 80 | extern sFONT Font8; 81 | /** 82 | * @} 83 | */ 84 | 85 | /** @defgroup FONTS_Exported_Constants 86 | * @{ 87 | */ 88 | #define LINE(x) ((x) * (((sFONT *)BSP_LCD_GetFont())->Height)) 89 | 90 | /** 91 | * @} 92 | */ 93 | 94 | /** @defgroup FONTS_Exported_Macros 95 | * @{ 96 | */ 97 | /** 98 | * @} 99 | */ 100 | 101 | /** @defgroup FONTS_Exported_Functions 102 | * @{ 103 | */ 104 | /** 105 | * @} 106 | */ 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif /* __FONTS_H */ 113 | 114 | /** 115 | * @} 116 | */ 117 | 118 | /** 119 | * @} 120 | */ 121 | 122 | /** 123 | * @} 124 | */ 125 | 126 | /** 127 | * @} 128 | */ 129 | 130 | /** 131 | * @} 132 | */ 133 | 134 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 135 | -------------------------------------------------------------------------------- /Utilities/Log/lcd_log.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file lcd_log.h 4 | * @author MCD Application Team 5 | * @version V1.0.1 6 | * @date 18-November-2016 7 | * @brief header for the lcd_log.c file 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2016 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ 39 | #ifndef __LCD_LOG_H__ 40 | #define __LCD_LOG_H__ 41 | 42 | /* Includes ------------------------------------------------------------------*/ 43 | 44 | #include "lcd_log_conf.h" 45 | 46 | /** @addtogroup Utilities 47 | * @{ 48 | */ 49 | 50 | /** @addtogroup STM32_EVAL 51 | * @{ 52 | */ 53 | 54 | /** @addtogroup Common 55 | * @{ 56 | */ 57 | 58 | /** @addtogroup LCD_LOG 59 | * @{ 60 | */ 61 | 62 | /** @defgroup LCD_LOG 63 | * @brief 64 | * @{ 65 | */ 66 | 67 | 68 | /** @defgroup LCD_LOG_Exported_Defines 69 | * @{ 70 | */ 71 | 72 | #if (LCD_SCROLL_ENABLED == 1) 73 | #define LCD_CACHE_DEPTH (YWINDOW_SIZE + CACHE_SIZE) 74 | #else 75 | #define LCD_CACHE_DEPTH YWINDOW_SIZE 76 | #endif 77 | /** 78 | * @} 79 | */ 80 | 81 | /** @defgroup LCD_LOG_Exported_Types 82 | * @{ 83 | */ 84 | typedef struct _LCD_LOG_line 85 | { 86 | uint8_t line[128]; 87 | uint32_t color; 88 | 89 | }LCD_LOG_line; 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** @defgroup LCD_LOG_Exported_Macros 96 | * @{ 97 | */ 98 | #define LCD_ErrLog(...) do { \ 99 | LCD_LineColor = LCD_COLOR_RED;\ 100 | printf("ERROR: ") ;\ 101 | printf(__VA_ARGS__);\ 102 | LCD_LineColor = LCD_LOG_DEFAULT_COLOR;\ 103 | }while (0) 104 | 105 | #define LCD_UsrLog(...) do { \ 106 | LCD_LineColor = LCD_LOG_TEXT_COLOR;\ 107 | printf(__VA_ARGS__);\ 108 | } while (0) 109 | 110 | 111 | #define LCD_DbgLog(...) do { \ 112 | LCD_LineColor = LCD_COLOR_CYAN;\ 113 | printf(__VA_ARGS__);\ 114 | LCD_LineColor = LCD_LOG_DEFAULT_COLOR;\ 115 | }while (0) 116 | /** 117 | * @} 118 | */ 119 | 120 | /** @defgroup LCD_LOG_Exported_Variables 121 | * @{ 122 | */ 123 | extern uint32_t LCD_LineColor; 124 | 125 | /** 126 | * @} 127 | */ 128 | 129 | /** @defgroup LCD_LOG_Exported_FunctionsPrototype 130 | * @{ 131 | */ 132 | void LCD_LOG_Init(void); 133 | void LCD_LOG_DeInit(void); 134 | void LCD_LOG_SetHeader(uint8_t *Title); 135 | void LCD_LOG_SetFooter(uint8_t *Status); 136 | void LCD_LOG_ClearTextZone(void); 137 | void LCD_LOG_UpdateDisplay (void); 138 | 139 | #if (LCD_SCROLL_ENABLED == 1) 140 | ErrorStatus LCD_LOG_ScrollBack(void); 141 | ErrorStatus LCD_LOG_ScrollForward(void); 142 | #endif 143 | /** 144 | * @} 145 | */ 146 | 147 | 148 | #endif /* __LCD_LOG_H__ */ 149 | 150 | /** 151 | * @} 152 | */ 153 | 154 | /** 155 | * @} 156 | */ 157 | 158 | /** 159 | * @} 160 | */ 161 | 162 | /** 163 | * @} 164 | */ 165 | 166 | /** 167 | * @} 168 | */ 169 | 170 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 171 | -------------------------------------------------------------------------------- /Utilities/Log/lcd_log_conf_template.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file lcd_log_conf_template.h 4 | * @author MCD Application Team 5 | * @version V1.0.1 6 | * @date 18-November-2016 7 | * @brief lcd_log configuration template file. 8 | * This file should be copied to the application folder and modified 9 | * as follows: 10 | * - Rename it to 'lcd_log_conf.h'. 11 | * - Update the name of the LCD driver's header file, depending on 12 | * the EVAL board you are using, see line40 below (be default this 13 | * file will generate compile error unless you do this modification). 14 | ****************************************************************************** 15 | * @attention 16 | * 17 | *

© COPYRIGHT(c) 2016 STMicroelectronics

18 | * 19 | * Redistribution and use in source and binary forms, with or without modification, 20 | * are permitted provided that the following conditions are met: 21 | * 1. Redistributions of source code must retain the above copyright notice, 22 | * this list of conditions and the following disclaimer. 23 | * 2. Redistributions in binary form must reproduce the above copyright notice, 24 | * this list of conditions and the following disclaimer in the documentation 25 | * and/or other materials provided with the distribution. 26 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 27 | * may be used to endorse or promote products derived from this software 28 | * without specific prior written permission. 29 | * 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 31 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 32 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 33 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 34 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 35 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 36 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 37 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 38 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40 | * 41 | ****************************************************************************** 42 | */ 43 | 44 | /* Define to prevent recursive inclusion -------------------------------------*/ 45 | 46 | #ifndef __LCD_LOG_CONF_H__ 47 | #define __LCD_LOG_CONF_H__ 48 | 49 | 50 | /* Includes ------------------------------------------------------------------*/ 51 | #include "stm32xxx_eval_lcd.h" /* replace 'stm32xxx' with your EVAL board name, ex: stm324x9i_eval_lcd.h */ 52 | #include 53 | 54 | 55 | /** @addtogroup LCD_LOG 56 | * @{ 57 | */ 58 | 59 | /** @defgroup LCD_LOG 60 | * @brief This file is the 61 | * @{ 62 | */ 63 | 64 | 65 | /** @defgroup LCD_LOG_CONF_Exported_Defines 66 | * @{ 67 | */ 68 | 69 | /* Comment the line below to disable the scroll back and forward features */ 70 | #define LCD_SCROLL_ENABLED 1 71 | 72 | /* Define the Fonts */ 73 | #define LCD_LOG_HEADER_FONT Font16 74 | #define LCD_LOG_FOOTER_FONT Font12 75 | #define LCD_LOG_TEXT_FONT Font12 76 | 77 | /* Define the LCD LOG Color */ 78 | #define LCD_LOG_BACKGROUND_COLOR LCD_COLOR_WHITE 79 | #define LCD_LOG_TEXT_COLOR LCD_COLOR_DARKBLUE 80 | 81 | #define LCD_LOG_SOLID_BACKGROUND_COLOR LCD_COLOR_BLUE 82 | #define LCD_LOG_SOLID_TEXT_COLOR LCD_COLOR_WHITE 83 | 84 | /* Define the cache depth */ 85 | #define CACHE_SIZE 100 86 | #define YWINDOW_SIZE 17 87 | 88 | #if (YWINDOW_SIZE > 17) 89 | #error "Wrong YWINDOW SIZE" 90 | #endif 91 | 92 | /* Redirect the printf to the LCD */ 93 | #ifdef __GNUC__ 94 | /* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printf 95 | set to 'Yes') calls __io_putchar() */ 96 | #define LCD_LOG_PUTCHAR int __io_putchar(int ch) 97 | #else 98 | #define LCD_LOG_PUTCHAR int fputc(int ch, FILE *f) 99 | #endif /* __GNUC__ */ 100 | 101 | /** @defgroup LCD_LOG_CONF_Exported_TypesDefinitions 102 | * @{ 103 | */ 104 | 105 | /** 106 | * @} 107 | */ 108 | 109 | 110 | /** @defgroup LCD_LOG_Exported_Macros 111 | * @{ 112 | */ 113 | 114 | 115 | /** 116 | * @} 117 | */ 118 | 119 | /** @defgroup LCD_LOG_CONF_Exported_Variables 120 | * @{ 121 | */ 122 | 123 | /** 124 | * @} 125 | */ 126 | 127 | /** @defgroup LCD_LOG_CONF_Exported_FunctionsPrototype 128 | * @{ 129 | */ 130 | 131 | /** 132 | * @} 133 | */ 134 | 135 | 136 | #endif //__LCD_LOG_CONF_H__ 137 | 138 | /** 139 | * @} 140 | */ 141 | 142 | /** 143 | * @} 144 | */ 145 | 146 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 147 | --------------------------------------------------------------------------------