[PATCH 0/4] Creating a new GPIO API and adding implementation for STM32F4 BSP

Duc Doan dtbpkmte at gmail.com
Tue Jul 5 12:56:14 UTC 2022


Hello,

This patch adds a new GPIO API that aims at portability. GPIO of STM32F4 BSP has been implemented using this API. The sample application code can be found at https://github.com/dtbpkmte/GSoC-2022-RTEMS-Sample-Apps.

Best,

Duc Doan


 .gitignore                                         |     1 +
 bsps/arm/include/cmsis_compiler.h                  |   266 +
 bsps/arm/include/cmsis_gcc.h                       |  1152 +-
 bsps/arm/include/cmsis_version.h                   |    39 +
 bsps/arm/include/core_cm4.h                        |  4066 ++--
 bsps/arm/include/core_cm7.h                        |   582 +-
 bsps/arm/include/legacy/cmsis_gcc.h                |  1375 ++
 bsps/arm/include/legacy/core_cm7.h                 |  2515 +++
 bsps/arm/include/mpu_armv7.h                       |   270 +
 bsps/arm/stm32f4/gpio/gpio.c                       |   595 +
 bsps/arm/stm32f4/hal/Legacy/stm32f4xx_hal_can.c    |  1679 ++
 bsps/arm/stm32f4/hal/Legacy/stm32f4xx_hal_eth.c    |  2307 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal.c               |   615 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_adc.c           |  2110 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_adc_ex.c        |  1112 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_can.c           |  2462 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_cec.c           |   996 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_cortex.c        |   502 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_crc.c           |   328 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_cryp.c          |  7132 +++++++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_cryp_ex.c       |   680 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_dac.c           |  1341 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_dac_ex.c        |   495 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_dcmi.c          |  1161 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_dcmi_ex.c       |   182 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_dfsdm.c         |  4423 ++++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_dma.c           |  1305 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_dma2d.c         |  2126 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_dma_ex.c        |   313 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_dsi.c           |  2760 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_eth.c           |  3112 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_exti.c          |   547 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_flash.c         |   775 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_flash_ex.c      |  1347 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_flash_ramfunc.c |   172 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_fmpi2c.c        |  6864 +++++++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_fmpi2c_ex.c     |   258 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_fmpsmbus.c      |  2749 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_fmpsmbus_ex.c   |   145 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_gpio.c          |   533 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_hash.c          |  3514 ++++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_hash_ex.c       |  1040 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_hcd.c           |  1728 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_i2c.c           |  7524 +++++++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_i2c_ex.c        |   182 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_i2s.c           |  2094 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_i2s_ex.c        |  1135 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_irda.c          |  2687 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_iwdg.c          |   262 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_lptim.c         |  2484 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_ltdc.c          |  2215 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_ltdc_ex.c       |   151 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_mmc.c           |  3201 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_msp_template.c  |   100 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_nand.c          |  2405 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_nor.c           |  1543 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_pccard.c        |   946 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_pcd.c           |  2387 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_pcd_ex.c        |   341 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_pwr.c           |   571 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_pwr_ex.c        |   600 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_qspi.c          |  2915 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_rcc.c           |  1122 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_rcc_ex.c        |  3784 ++++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_rng.c           |   867 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_rtc.c           |  1896 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_rtc_ex.c        |  1878 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_sai.c           |  2554 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_sai_ex.c        |   310 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_sd.c            |  3277 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_sdram.c         |  1308 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_smartcard.c     |  2364 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_smbus.c         |  2784 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_spdifrx.c       |  1627 ++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_spi.c           |  3915 ++++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_sram.c          |  1110 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_tim.c           |  7621 +++++++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_tim_ex.c        |  2428 +++
 .../stm32f4xx_hal_timebase_rtc_alarm_template.c    |   318 +
 .../stm32f4xx_hal_timebase_rtc_wakeup_template.c   |   293 +
 .../hal/stm32f4xx_hal_timebase_tim_template.c      |   177 +
 bsps/arm/stm32f4/hal/stm32f4xx_hal_uart.c          |  3751 ++++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_usart.c         |  2838 +++
 bsps/arm/stm32f4/hal/stm32f4xx_hal_wwdg.c          |   420 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_adc.c            |   922 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_crc.c            |   103 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_dac.c            |   280 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_dma.c            |   423 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_dma2d.c          |   594 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_exti.c           |   212 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_fmc.c            |  1498 ++
 bsps/arm/stm32f4/hal/stm32f4xx_ll_fmpi2c.c         |   217 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_fsmc.c           |  1062 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_gpio.c           |   303 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_i2c.c            |   251 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_lptim.c          |   301 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_pwr.c            |    81 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_rcc.c            |  1660 ++
 bsps/arm/stm32f4/hal/stm32f4xx_ll_rng.c            |   111 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_rtc.c            |   838 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_sdmmc.c          |  1578 ++
 bsps/arm/stm32f4/hal/stm32f4xx_ll_spi.c            |   624 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_tim.c            |  1189 ++
 bsps/arm/stm32f4/hal/stm32f4xx_ll_usart.c          |   500 +
 bsps/arm/stm32f4/hal/stm32f4xx_ll_usb.c            |  2224 ++
 bsps/arm/stm32f4/hal/stm32f4xx_ll_utils.c          |   749 +
 bsps/arm/stm32f4/hal/system_stm32f4xx.c            |   747 +
 bsps/arm/stm32f4/include/Legacy/stm32_hal_legacy.h |  3982 ++++
 .../include/Legacy/stm32f4xx_hal_can_legacy.h      |   765 +
 .../include/Legacy/stm32f4xx_hal_eth_legacy.h      |  2209 ++
 bsps/arm/stm32f4/include/bsp/io.h                  |     4 +
 bsps/arm/stm32f4/include/bsp/stm32f4_gpio.h        |    37 +
 bsps/arm/stm32f4/include/bsp/stm32f4_hal.h         |    17 +
 bsps/arm/stm32f4/include/stm32f401xc.h             |  8641 ++++++++
 bsps/arm/stm32f4/include/stm32f401xe.h             |  8641 ++++++++
 bsps/arm/stm32f4/include/stm32f405xx.h             | 14310 +++++++++++++
 bsps/arm/stm32f4/include/stm32f407xx.h             | 15607 ++++++++++++++
 bsps/arm/stm32f4/include/stm32f410cx.h             |  7357 +++++++
 bsps/arm/stm32f4/include/stm32f410rx.h             |  7361 +++++++
 bsps/arm/stm32f4/include/stm32f410tx.h             |  7306 +++++++
 bsps/arm/stm32f4/include/stm32f411xe.h             |  8680 ++++++++
 bsps/arm/stm32f4/include/stm32f412cx.h             | 13507 ++++++++++++
 bsps/arm/stm32f4/include/stm32f412rx.h             | 14500 +++++++++++++
 bsps/arm/stm32f4/include/stm32f412vx.h             | 14512 +++++++++++++
 bsps/arm/stm32f4/include/stm32f412zx.h             | 14537 +++++++++++++
 bsps/arm/stm32f4/include/stm32f413xx.h             | 15462 ++++++++++++++
 bsps/arm/stm32f4/include/stm32f415xx.h             | 14595 +++++++++++++
 bsps/arm/stm32f4/include/stm32f417xx.h             | 15887 ++++++++++++++
 bsps/arm/stm32f4/include/stm32f423xx.h             | 15615 ++++++++++++++
 bsps/arm/stm32f4/include/stm32f427xx.h             | 16827 +++++++++++++++
 bsps/arm/stm32f4/include/stm32f429xx.h             | 17185 ++++++++++++++++
 bsps/arm/stm32f4/include/stm32f437xx.h             | 17129 +++++++++++++++
 bsps/arm/stm32f4/include/stm32f439xx.h             | 17479 ++++++++++++++++
 bsps/arm/stm32f4/include/stm32f446xx.h             | 15981 ++++++++++++++
 bsps/arm/stm32f4/include/stm32f469xx.h             | 20278 ++++++++++++++++++
 bsps/arm/stm32f4/include/stm32f479xx.h             | 20575 +++++++++++++++++++
 bsps/arm/stm32f4/include/stm32f4xx.h               |   305 +
 bsps/arm/stm32f4/include/stm32f4xx_hal.h           |   297 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_adc.h       |   898 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_adc_ex.h    |   407 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_can.h       |   844 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_cec.h       |   792 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_conf.h      |   506 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_cortex.h    |   407 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_crc.h       |   181 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_cryp.h      |   683 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_cryp_ex.h   |   142 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_dac.h       |   480 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_dac_ex.h    |   205 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_dcmi.h      |   563 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_dcmi_ex.h   |   208 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_def.h       |   210 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_dfsdm.h     |  1141 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_dma.h       |   802 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_dma2d.h     |   638 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_dma_ex.h    |   102 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_dsi.h       |  1377 ++
 bsps/arm/stm32f4/include/stm32f4xx_hal_eth.h       |  2147 ++
 bsps/arm/stm32f4/include/stm32f4xx_hal_exti.h      |   366 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_flash.h     |   425 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_flash_ex.h  |  1063 +
 .../stm32f4/include/stm32f4xx_hal_flash_ramfunc.h  |    76 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_fmpi2c.h    |   837 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_fmpi2c_ex.h |   150 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_fmpsmbus.h  |   790 +
 .../stm32f4/include/stm32f4xx_hal_fmpsmbus_ex.h    |   136 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_gpio.h      |   325 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_gpio_ex.h   |  1590 ++
 bsps/arm/stm32f4/include/stm32f4xx_hal_hash.h      |   634 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_hash_ex.h   |   175 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_hcd.h       |   316 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_i2c.h       |   741 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_i2c_ex.h    |   115 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_i2s.h       |   618 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_i2s_ex.h    |   183 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_irda.h      |   682 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_iwdg.h      |   220 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_lptim.h     |   857 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_ltdc.h      |   719 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_ltdc_ex.h   |    83 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_mmc.h       |   747 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_nand.h      |   388 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_nor.h       |   330 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_pccard.h    |   285 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_pcd.h       |   459 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_pcd_ex.h    |    88 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_pwr.h       |   427 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_pwr_ex.h    |   340 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_qspi.h      |   750 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_rcc.h       |  1459 ++
 bsps/arm/stm32f4/include/stm32f4xx_hal_rcc_ex.h    |  7111 +++++++
 bsps/arm/stm32f4/include/stm32f4xx_hal_rng.h       |   361 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_rtc.h       |   915 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_rtc_ex.h    |  1079 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_sai.h       |   895 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_sai_ex.h    |   114 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_sd.h        |   758 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_sdram.h     |   238 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_smartcard.h |   755 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_smbus.h     |   731 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_spdifrx.h   |   604 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_spi.h       |   729 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_sram.h      |   236 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_tim.h       |  2146 ++
 bsps/arm/stm32f4/include/stm32f4xx_hal_tim_ex.h    |   354 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_uart.h      |   884 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_usart.h     |   648 +
 bsps/arm/stm32f4/include/stm32f4xx_hal_wwdg.h      |   298 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_adc.h        |  4779 +++++
 bsps/arm/stm32f4/include/stm32f4xx_ll_bus.h        |  2105 ++
 bsps/arm/stm32f4/include/stm32f4xx_ll_cortex.h     |   637 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_crc.h        |   201 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_dac.h        |  1455 ++
 bsps/arm/stm32f4/include/stm32f4xx_ll_dma.h        |  2868 +++
 bsps/arm/stm32f4/include/stm32f4xx_ll_dma2d.h      |  1901 ++
 bsps/arm/stm32f4/include/stm32f4xx_ll_exti.h       |   954 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_fmc.h        |  1416 ++
 bsps/arm/stm32f4/include/stm32f4xx_ll_fmpi2c.h     |  2234 ++
 bsps/arm/stm32f4/include/stm32f4xx_ll_fsmc.h       |  1086 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_gpio.h       |   981 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_i2c.h        |  1890 ++
 bsps/arm/stm32f4/include/stm32f4xx_ll_iwdg.h       |   302 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_lptim.h      |  1378 ++
 bsps/arm/stm32f4/include/stm32f4xx_ll_pwr.h        |   985 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_rcc.h        |  7096 +++++++
 bsps/arm/stm32f4/include/stm32f4xx_ll_rng.h        |   335 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_rtc.h        |  3663 ++++
 bsps/arm/stm32f4/include/stm32f4xx_ll_sdmmc.h      |  1141 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_spi.h        |  2027 ++
 bsps/arm/stm32f4/include/stm32f4xx_ll_system.h     |  1711 ++
 bsps/arm/stm32f4/include/stm32f4xx_ll_tim.h        |  4093 ++++
 bsps/arm/stm32f4/include/stm32f4xx_ll_usart.h      |  2521 +++
 bsps/arm/stm32f4/include/stm32f4xx_ll_usb.h        |   536 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_utils.h      |   307 +
 bsps/arm/stm32f4/include/stm32f4xx_ll_wwdg.h       |   316 +
 bsps/arm/stm32f4/include/system_stm32f4xx.h        |   104 +
 bsps/arm/stm32f4/start/bspstart.c                  |   208 +-
 bsps/arm/stm32f4/start/bspstart_old.c              |   297 +
 bsps/include/bsp/gpio2.h                           |   538 +
 bsps/shared/dev/gpio/gpio.c                        |   196 +
 spec/build/bsps/arm/grp.yml                        |     8 +-
 spec/build/bsps/arm/stm32f4/grp.yml                |    16 +-
 spec/build/bsps/arm/stm32f4/obj.yml                |   221 +
 spec/build/bsps/arm/stm32f4/optenhal.yml           |    16 +
 spec/build/bsps/arm/stm32f4/opthse.yml             |    17 +
 spec/build/bsps/arm/stm32f4/optnumgpioctrl.yml     |    16 +
 spec/build/bsps/arm/stm32f4/optusehse.yml          |    16 +
 spec/build/bsps/arm/stm32f4/optvariant.yml         |    24 +
 spec/build/bsps/obj.yml                            |     3 +-
 249 files changed, 590283 insertions(+), 2392 deletions(-)


More information about the devel mailing list