This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 8ece56ff11fb2cd1e1f3680de54d03bb10ebdc39
Author: raiden00pl <[email protected]>
AuthorDate: Fri May 29 16:22:18 2026 +0200

    !arm/stm32h5: standardize public API prefix to stm32_
    
    BREAKING CHANGE: Public STM32H5 APIs were renamed from stm32h5_*
    forms to canonical stm32_* forms.
    
    Signed-off-by: raiden00pl <[email protected]>
---
 arch/arm/src/stm32h5/stm32_adc.c                 |  7 +++----
 arch/arm/src/stm32h5/stm32_adc.h                 |  7 +++----
 arch/arm/src/stm32h5/stm32_dts.c                 |  2 +-
 arch/arm/src/stm32h5/stm32_dts.h                 |  2 +-
 arch/arm/src/stm32h5/stm32_flash.h               | 12 ++++++------
 arch/arm/src/stm32h5/stm32_hsi48.c               |  8 ++++----
 arch/arm/src/stm32h5/stm32_hsi48.h               |  8 ++++----
 arch/arm/src/stm32h5/stm32_usbdrdhost.c          | 10 +++++-----
 arch/arm/src/stm32h5/stm32_usbdrdhost.h          | 10 +++++-----
 arch/arm/src/stm32h5/stm32h563xx_flash.c         | 22 +++++++++++-----------
 arch/arm/src/stm32h5/stm32h5xx_rcc.c             |  2 +-
 boards/arm/stm32h5/nucleo-h563zi/src/stm32_adc.c |  4 ++--
 boards/arm/stm32h5/nucleo-h563zi/src/stm32_dts.c |  2 +-
 boards/arm/stm32h5/nucleo-h563zi/src/stm32_usb.c |  6 +++---
 14 files changed, 50 insertions(+), 52 deletions(-)

diff --git a/arch/arm/src/stm32h5/stm32_adc.c b/arch/arm/src/stm32h5/stm32_adc.c
index a503d233a94..c6bee5ce1fc 100644
--- a/arch/arm/src/stm32h5/stm32_adc.c
+++ b/arch/arm/src/stm32h5/stm32_adc.c
@@ -2585,12 +2585,11 @@ static int adc_timinit(struct stm32_dev_s *priv)
  ****************************************************************************/
 
 /****************************************************************************
- * Name: stm32h5_adc_initialize
+ * Name: stm32_adc_initialize
  ****************************************************************************/
 
-struct adc_dev_s *stm32h5_adc_initialize(int intf,
-                                         const uint8_t *chanlist,
-                                         int cchannels)
+struct adc_dev_s *stm32_adc_initialize(int intf, const uint8_t *chanlist,
+                                       int cchannels)
 {
   struct adc_dev_s *dev;
   struct stm32_dev_s *priv;
diff --git a/arch/arm/src/stm32h5/stm32_adc.h b/arch/arm/src/stm32h5/stm32_adc.h
index 7777d539376..cc4dff62400 100644
--- a/arch/arm/src/stm32h5/stm32_adc.h
+++ b/arch/arm/src/stm32h5/stm32_adc.h
@@ -500,7 +500,7 @@ extern "C"
 #endif
 
 /****************************************************************************
- * Name: stm32h5_adc_initialize
+ * Name: stm32_adc_initialize
  *
  * Description:
  *    Initialize the ADC.
@@ -516,9 +516,8 @@ extern "C"
  ****************************************************************************/
 
 struct adc_dev_s;
-struct adc_dev_s *stm32h5_adc_initialize(int intf,
-                                         const uint8_t *chanlist,
-                                         int nchannels);
+struct adc_dev_s *stm32_adc_initialize(int intf, const uint8_t *chanlist,
+                                       int nchannels);
 #undef EXTERN
 #ifdef __cplusplus
 }
diff --git a/arch/arm/src/stm32h5/stm32_dts.c b/arch/arm/src/stm32h5/stm32_dts.c
index efcf5da4795..4719c59ce1c 100644
--- a/arch/arm/src/stm32h5/stm32_dts.c
+++ b/arch/arm/src/stm32h5/stm32_dts.c
@@ -538,7 +538,7 @@ static int stm32_dts_isr(int irq, void *context, void *arg)
  * Name: stm32_dts_register
  ****************************************************************************/
 
-int stm32h5_dts_register(int devno)
+int stm32_dts_register(int devno)
 {
   int ret;
 
diff --git a/arch/arm/src/stm32h5/stm32_dts.h b/arch/arm/src/stm32h5/stm32_dts.h
index 67e796699a9..560ef39cfdb 100644
--- a/arch/arm/src/stm32h5/stm32_dts.h
+++ b/arch/arm/src/stm32h5/stm32_dts.h
@@ -65,7 +65,7 @@ extern "C"
 #define EXTERN extern
 #endif
 
-int stm32h5_dts_register(int devno);
+int stm32_dts_register(int devno);
 
 #undef EXTERN
 #if defined(__cplusplus)
diff --git a/arch/arm/src/stm32h5/stm32_flash.h 
b/arch/arm/src/stm32h5/stm32_flash.h
index bb0220a9215..3dd4f10fd4e 100644
--- a/arch/arm/src/stm32h5/stm32_flash.h
+++ b/arch/arm/src/stm32h5/stm32_flash.h
@@ -45,16 +45,16 @@ extern "C"
 #define EXTERN extern
 #endif
 
-void stm32h5_flash_getopt(uint32_t *opt1, uint32_t *opt2);
+void stm32_flash_getopt(uint32_t *opt1, uint32_t *opt2);
 
-int stm32h5_flash_optmodify(uint32_t clear1, uint32_t set1,
-                            uint32_t clear2, uint32_t set2);
+int stm32_flash_optmodify(uint32_t clear1, uint32_t set1,
+                          uint32_t clear2, uint32_t set2);
 
-int stm32h5_flash_swapbanks(void);
+int stm32_flash_swapbanks(void);
 
-void stm32h5_flash_lock(void);
+void stm32_flash_lock(void);
 
-void stm32h5_flash_unlock(void);
+void stm32_flash_unlock(void);
 
 #undef EXTERN
 #if defined(__cplusplus)
diff --git a/arch/arm/src/stm32h5/stm32_hsi48.c 
b/arch/arm/src/stm32h5/stm32_hsi48.c
index 7ad06b84912..1cf72a2e56f 100644
--- a/arch/arm/src/stm32h5/stm32_hsi48.c
+++ b/arch/arm/src/stm32h5/stm32_hsi48.c
@@ -39,7 +39,7 @@
 
 #ifdef CONFIG_STM32H5_HAVE_HSI48
 /****************************************************************************
- * Name: stm32h5_enable_hsi48
+ * Name: stm32_enable_hsi48
  *
  * Description:
  *   The HSI48
@@ -65,7 +65,7 @@
  *
  ****************************************************************************/
 
-void stm32h5_enable_hsi48(enum syncsrc_e syncsrc)
+void stm32_enable_hsi48(enum syncsrc_e syncsrc)
 {
   uint32_t regval;
 
@@ -134,7 +134,7 @@ void stm32h5_enable_hsi48(enum syncsrc_e syncsrc)
 }
 
 /****************************************************************************
- * Name: stm32h5_disable_hsi48
+ * Name: stm32_disable_hsi48
  *
  * Description:
  *   Disable the HSI48 clock.
@@ -147,7 +147,7 @@ void stm32h5_enable_hsi48(enum syncsrc_e syncsrc)
  *
  ****************************************************************************/
 
-void stm32h5_disable_hsi48(void)
+void stm32_disable_hsi48(void)
 {
   uint32_t regval;
 
diff --git a/arch/arm/src/stm32h5/stm32_hsi48.h 
b/arch/arm/src/stm32h5/stm32_hsi48.h
index 458a27f6aaa..a27e5458320 100644
--- a/arch/arm/src/stm32h5/stm32_hsi48.h
+++ b/arch/arm/src/stm32h5/stm32_hsi48.h
@@ -48,7 +48,7 @@ enum syncsrc_e
  ****************************************************************************/
 
 /****************************************************************************
- * Name: stm32h5_enable_hsi48
+ * Name: stm32_enable_hsi48
  *
  * Description:
  *   On STM32H5X3, STM32H596xx/4A6xx and STM32H5XR devices only, the HSI48
@@ -74,10 +74,10 @@ enum syncsrc_e
  *
  ****************************************************************************/
 
-void stm32h5_enable_hsi48(enum syncsrc_e syncsrc);
+void stm32_enable_hsi48(enum syncsrc_e syncsrc);
 
 /****************************************************************************
- * Name: stm32h5_disable_hsi48
+ * Name: stm32_disable_hsi48
  *
  * Description:
  *   Disable the HSI48 clock.
@@ -90,7 +90,7 @@ void stm32h5_enable_hsi48(enum syncsrc_e syncsrc);
  *
  ****************************************************************************/
 
-void stm32h5_disable_hsi48(void);
+void stm32_disable_hsi48(void);
 
 #endif /* CONFIG_STM32H5_HAVE_HSI48 */
 #endif /* __ARCH_ARM_SRC_STM32H5_STM32_HSI48_H */
diff --git a/arch/arm/src/stm32h5/stm32_usbdrdhost.c 
b/arch/arm/src/stm32h5/stm32_usbdrdhost.c
index 11d20e68e67..a9b9332eb21 100644
--- a/arch/arm/src/stm32h5/stm32_usbdrdhost.c
+++ b/arch/arm/src/stm32h5/stm32_usbdrdhost.c
@@ -2829,7 +2829,7 @@ static int stm32_hw_initialize(struct stm32_usbhost_s 
*priv)
 
   /* Enable VBUS drive */
 
-  stm32h5_usbhost_vbusdrive(0, true);
+  stm32_usbdrdhost_vbusdrive(0, true);
 
   uinfo("USB Host initialized\n");
 
@@ -2841,14 +2841,14 @@ static int stm32_hw_initialize(struct stm32_usbhost_s 
*priv)
  ****************************************************************************/
 
 /****************************************************************************
- * Name: stm32h5_usbhost_initialize
+ * Name: stm32_usbdrdhost_initialize
  *
  * Description:
  *   Initialize USB host controller
  *
  ****************************************************************************/
 
-struct usbhost_connection_s *stm32h5_usbhost_initialize(void)
+struct usbhost_connection_s *stm32_usbdrdhost_initialize(void)
 {
   struct stm32_usbhost_s *priv = &g_usbhost;
   int ret;
@@ -2872,7 +2872,7 @@ struct usbhost_connection_s 
*stm32h5_usbhost_initialize(void)
 }
 
 /****************************************************************************
- * Name: stm32_usbhost_vbusdrive
+ * Name: stm32_usbdrdhost_vbusdrive
  *
  * Description:
  *   Control VBUS power
@@ -2881,7 +2881,7 @@ struct usbhost_connection_s 
*stm32h5_usbhost_initialize(void)
  ****************************************************************************/
 
 __attribute__((weak))
-void stm32_usbhost_vbusdrive(int port, bool enable)
+void stm32_usbdrdhost_vbusdrive(int port, bool enable)
 {
   /* Default implementation - do nothing.
    * Board-specific code should override this to control VBUS power.
diff --git a/arch/arm/src/stm32h5/stm32_usbdrdhost.h 
b/arch/arm/src/stm32h5/stm32_usbdrdhost.h
index f96b56e0cb7..1cccbd78e31 100644
--- a/arch/arm/src/stm32h5/stm32_usbdrdhost.h
+++ b/arch/arm/src/stm32h5/stm32_usbdrdhost.h
@@ -63,7 +63,7 @@
  * to the board-level USB host logic.
  */
 
-struct stm32h5_usbhost_connection_s
+struct stm32_usbhost_connection_s
 {
   /* Wait for device connection/disconnection */
 
@@ -90,7 +90,7 @@ extern "C"
  ****************************************************************************/
 
 /****************************************************************************
- * Name: stm32h5_usbhost_initialize
+ * Name: stm32_usbdrdhost_initialize
  *
  * Description:
  *   Initialize USB host controller hardware.
@@ -108,10 +108,10 @@ extern "C"
  *
  ****************************************************************************/
 
-struct usbhost_connection_s *stm32h5_usbhost_initialize(void);
+struct usbhost_connection_s *stm32_usbdrdhost_initialize(void);
 
 /****************************************************************************
- * Name: stm32h5_usbhost_vbusdrive
+ * Name: stm32_usbdrdhost_vbusdrive
  *
  * Description:
  *   Enable/disable VBUS power to the connected USB device.
@@ -133,7 +133,7 @@ struct usbhost_connection_s 
*stm32h5_usbhost_initialize(void);
  *
  ****************************************************************************/
 
-void stm32h5_usbhost_vbusdrive(int port, bool enable);
+void stm32_usbdrdhost_vbusdrive(int port, bool enable);
 
 #undef EXTERN
 #if defined(__cplusplus)
diff --git a/arch/arm/src/stm32h5/stm32h563xx_flash.c 
b/arch/arm/src/stm32h5/stm32h563xx_flash.c
index 199cc59b9d9..11656e1212b 100644
--- a/arch/arm/src/stm32h5/stm32h563xx_flash.c
+++ b/arch/arm/src/stm32h5/stm32h563xx_flash.c
@@ -344,14 +344,14 @@ static void flash_lock_opt(void)
  ****************************************************************************/
 
 /****************************************************************************
- * Name: stm32h5_flash_unlock
+ * Name: stm32_flash_unlock
  *
  * Description:
  *   Unlock non-secure flash control
  *
  ****************************************************************************/
 
-void stm32h5_flash_unlock(void)
+void stm32_flash_unlock(void)
 {
   nxmutex_lock(&g_lock);
   flash_unlock_nscr();
@@ -359,14 +359,14 @@ void stm32h5_flash_unlock(void)
 }
 
 /****************************************************************************
- * Name: stm32h5_flash_lock
+ * Name: stm32_flash_lock
  *
  * Description:
  *   Lock non-secure flash control
  *
  ****************************************************************************/
 
-void stm32h5_flash_lock(void)
+void stm32_flash_lock(void)
 {
   nxmutex_lock(&g_lock);
   flash_lock_nscr();
@@ -374,7 +374,7 @@ void stm32h5_flash_lock(void)
 }
 
 /****************************************************************************
- * Name: stm32h5_flash_getopt
+ * Name: stm32_flash_getopt
  *
  * Description:
  *   Read the current flash option bytes from FLASH_OPTSR_CUR and
@@ -386,14 +386,14 @@ void stm32h5_flash_lock(void)
  *
  ****************************************************************************/
 
-void stm32h5_flash_getopt(uint32_t *opt1, uint32_t *opt2)
+void stm32_flash_getopt(uint32_t *opt1, uint32_t *opt2)
 {
   *opt1 = getreg32(STM32_FLASH_OPTSR_CUR);
   *opt2 = getreg32(STM32_FLASH_OPTSR2_CUR);
 }
 
 /****************************************************************************
- * Name: stm32h5_flash_optmodify
+ * Name: stm32_flash_optmodify
  *
  * Description:
  *   Modifies the current flash option bytes, given bits to set and clear.
@@ -412,8 +412,8 @@ void stm32h5_flash_getopt(uint32_t *opt1, uint32_t *opt2)
  *
  ****************************************************************************/
 
-int stm32h5_flash_optmodify(uint32_t clear1, uint32_t set1,
-                             uint32_t clear2, uint32_t set2)
+int stm32_flash_optmodify(uint32_t clear1, uint32_t set1,
+                          uint32_t clear2, uint32_t set2)
 {
   int ret;
   uint32_t reg;
@@ -451,7 +451,7 @@ int stm32h5_flash_optmodify(uint32_t clear1, uint32_t set1,
 }
 
 /****************************************************************************
- * Name: stm32h5_flash_swapbanks
+ * Name: stm32_flash_swapbanks
  *
  * Description:
  *   Swaps banks 1 and 2 in the processor's memory map.  Takes effect
@@ -464,7 +464,7 @@ int stm32h5_flash_optmodify(uint32_t clear1, uint32_t set1,
  *
  ****************************************************************************/
 
-int stm32h5_flash_swapbanks(void)
+int stm32_flash_swapbanks(void)
 {
   uint32_t reg;
   bool was_locked;
diff --git a/arch/arm/src/stm32h5/stm32h5xx_rcc.c 
b/arch/arm/src/stm32h5/stm32h5xx_rcc.c
index 87b12f55e92..c26278872f2 100644
--- a/arch/arm/src/stm32h5/stm32h5xx_rcc.c
+++ b/arch/arm/src/stm32h5/stm32h5xx_rcc.c
@@ -845,7 +845,7 @@ void stm32_rcc_enableperipherals(void)
 #ifdef STM32_USE_HSI48
   /* Enable HSI48 clocking to support USB transfers or RNG */
 
-  stm32h5_enable_hsi48(STM32_HSI48_SYNCSRC);
+  stm32_enable_hsi48(STM32_HSI48_SYNCSRC);
 #endif
 }
 
diff --git a/boards/arm/stm32h5/nucleo-h563zi/src/stm32_adc.c 
b/boards/arm/stm32h5/nucleo-h563zi/src/stm32_adc.c
index ff662f03c1f..9061382e463 100644
--- a/boards/arm/stm32h5/nucleo-h563zi/src/stm32_adc.c
+++ b/boards/arm/stm32h5/nucleo-h563zi/src/stm32_adc.c
@@ -122,7 +122,7 @@ int stm32_adc_setup(void)
           stm32_configgpio(g_pinlist1[i]);
         }
 
-      adc1 = stm32h5_adc_initialize(1, g_chanlist1, ADC1_NCHANNELS);
+      adc1 = stm32_adc_initialize(1, g_chanlist1, ADC1_NCHANNELS);
       if (adc1 == NULL)
         {
           aerr("ERROR: Failed to get ADC interface 1\n");
@@ -145,7 +145,7 @@ int stm32_adc_setup(void)
           stm32_configgpio(g_pinlist2[i]);
         }
 
-      adc2 = stm32h5_adc_initialize(2, g_chanlist2, ADC2_NCHANNELS);
+      adc2 = stm32_adc_initialize(2, g_chanlist2, ADC2_NCHANNELS);
       if (adc2 == NULL)
         {
           aerr("ERROR: Failed to get ADC interface 1\n");
diff --git a/boards/arm/stm32h5/nucleo-h563zi/src/stm32_dts.c 
b/boards/arm/stm32h5/nucleo-h563zi/src/stm32_dts.c
index 4b1fbd9a713..8a0e6d61858 100644
--- a/boards/arm/stm32h5/nucleo-h563zi/src/stm32_dts.c
+++ b/boards/arm/stm32h5/nucleo-h563zi/src/stm32_dts.c
@@ -75,7 +75,7 @@ int stm32_dts_setup(int devno)
     {
       /* Register the DTS driver at "/dev/sensor_temp0" */
 
-      ret = stm32h5_dts_register(0);
+      ret = stm32_dts_register(0);
       if (ret < 0)
         {
           aerr("ERROR: dts_register /dev/dts0 failed: %d\n", ret);
diff --git a/boards/arm/stm32h5/nucleo-h563zi/src/stm32_usb.c 
b/boards/arm/stm32h5/nucleo-h563zi/src/stm32_usb.c
index cb293dd7f6e..dcf5bae1cbd 100644
--- a/boards/arm/stm32h5/nucleo-h563zi/src/stm32_usb.c
+++ b/boards/arm/stm32h5/nucleo-h563zi/src/stm32_usb.c
@@ -185,7 +185,7 @@ int stm32_usbhost_initialize(void)
   /* Then get an instance of the USB host interface */
 
   uinfo("Initialize USB host\n");
-  g_usbconn = stm32h5_usbhost_initialize();
+  g_usbconn = stm32_usbdrdhost_initialize();
   if (g_usbconn)
     {
       /* Start a thread to handle device connection. */
@@ -203,7 +203,7 @@ int stm32_usbhost_initialize(void)
 #endif
 
 /****************************************************************************
- * Name: stm32_usbhost_vbusdrive
+ * Name: stm32_usbdrdhost_vbusdrive
  *
  * Description:
  *   Enable/disable driving of VBUS 5V output.  This function must be
@@ -232,7 +232,7 @@ int stm32_usbhost_initialize(void)
  ****************************************************************************/
 
 #ifdef CONFIG_USBHOST
-void stm32h5_usbhost_vbusdrive(int port, bool enable)
+void stm32_usbdrdhost_vbusdrive(int port, bool enable)
 {
   /* The Nucleo-h563zi doesn't have hardware for a vbus drive.
    * Instead to get host working, you need to put an extra jumper

Reply via email to