From 357641ec7404df24b01f32dfbddc0613d4637cad Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 29 Apr 2019 06:53:59 -0600 Subject: [PATCH] configs/nucleo-l476rg/src: Make naming of functions consistent: stm32l4_ no stm32_. Inconsistency noted by Phil Coval in Bitbucket PR 864. This commit takes a different approach to resolving the naming inconsistency, however. --- configs/nucleo-l476rg/src/nucleo-l476rg.h | 8 ++++---- configs/nucleo-l476rg/src/stm32_appinit.c | 6 +++--- configs/nucleo-l476rg/src/stm32_can.c | 4 ++-- configs/nucleo-l476rg/src/stm32_cc1101.c | 4 ++-- configs/nucleo-l476rg/src/stm32_gpio.c | 2 +- configs/nucleo-l476rg/src/stm32_lsm303agr.c | 2 +- configs/nucleo-l476rg/src/stm32_lsm6dsl.c | 4 ++-- configs/nucleo-l476rg/src/stm32_pwm.c | 4 ++-- configs/nucleo-l476rg/src/stm32_spimmcsd.c | 10 ++++++---- configs/nucleo-l476rg/src/stm32_timer.c | 2 +- configs/nucleo-l476rg/src/stm32_userleds.c | 4 ++-- 11 files changed, 26 insertions(+), 24 deletions(-) diff --git a/configs/nucleo-l476rg/src/nucleo-l476rg.h b/configs/nucleo-l476rg/src/nucleo-l476rg.h index 4b2a47851c..9bb2be0005 100644 --- a/configs/nucleo-l476rg/src/nucleo-l476rg.h +++ b/configs/nucleo-l476rg/src/nucleo-l476rg.h @@ -312,7 +312,7 @@ void stm32l4_spiinitialize(void); void stm32l4_usbinitialize(void); /**************************************************************************** - * Name: stm32_gpio_initialize + * Name: stm32l4_gpio_initialize * * Description: * Initialize GPIO drivers for use with /apps/examples/gpio @@ -346,7 +346,7 @@ int stm32l4_can_setup(void); ************************************************************************************/ #ifdef CONFIG_PWM -int stm32_pwm_setup(void); +int stm32l4_pwm_setup(void); #endif /************************************************************************************ @@ -410,7 +410,7 @@ int stm32l4_qencoder_initialize(FAR const char *devpath, int timer); #endif /**************************************************************************** - * Name: stm32_cc1101_initialize + * Name: stm32l4_cc1101_initialize * * Description: * Initialize and register the cc1101 radio driver @@ -418,7 +418,7 @@ int stm32l4_qencoder_initialize(FAR const char *devpath, int timer); ****************************************************************************/ #ifdef CONFIG_WL_CC1101 -int stm32_cc1101_initialize(void); +int stm32l4_cc1101_initialize(void); #endif #endif /* __CONFIGS_NUCLEO_L476RG_SRC_NUCLEO_L476RG_H */ diff --git a/configs/nucleo-l476rg/src/stm32_appinit.c b/configs/nucleo-l476rg/src/stm32_appinit.c index 6f62f8c632..65f5924004 100644 --- a/configs/nucleo-l476rg/src/stm32_appinit.c +++ b/configs/nucleo-l476rg/src/stm32_appinit.c @@ -193,7 +193,7 @@ int board_app_initialize(uintptr_t arg) #ifdef CONFIG_PWM /* Initialize PWM and register the PWM device. */ - ret = stm32_pwm_setup(); + ret = stm32l4_pwm_setup(); if (ret < 0) { syslog(LOG_ERR, "ERROR: stm32l4_pwm_setup() failed: %d\n", ret); @@ -370,11 +370,11 @@ int board_app_initialize(uintptr_t arg) #ifdef CONFIG_WL_CC1101 /* Initialize and register the cc1101 radio */ - ret = stm32_cc1101_initialize(); + ret = stm32l4_cc1101_initialize(); if (ret < 0) { syslog(LOG_ERR, - "ERROR: stm32_cc1101_initialize failed: %d\n", + "ERROR: stm32l4_cc1101_initialize failed: %d\n", ret); return ret; } diff --git a/configs/nucleo-l476rg/src/stm32_can.c b/configs/nucleo-l476rg/src/stm32_can.c index c1a1948b31..d2d608f7d1 100644 --- a/configs/nucleo-l476rg/src/stm32_can.c +++ b/configs/nucleo-l476rg/src/stm32_can.c @@ -69,7 +69,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: stm32_can_setup + * Name: stm32l4_can_setup * * Description: * Initialize CAN and register the CAN device @@ -82,7 +82,7 @@ int stm32l4_can_setup(void) struct can_dev_s *can; int ret; - /* Call stm32_caninitialize() to get an instance of the CAN interface */ + /* Call stm32l4can_initialize() to get an instance of the CAN interface */ can = stm32l4can_initialize(CAN_PORT); if (can == NULL) diff --git a/configs/nucleo-l476rg/src/stm32_cc1101.c b/configs/nucleo-l476rg/src/stm32_cc1101.c index fd929239f5..c48110c979 100644 --- a/configs/nucleo-l476rg/src/stm32_cc1101.c +++ b/configs/nucleo-l476rg/src/stm32_cc1101.c @@ -108,14 +108,14 @@ static void cc1101_pwr(FAR struct cc1101_dev_s *dev, bool enable) ****************************************************************************/ /**************************************************************************** - * Name: stm32_cc1101_initialize + * Name: stm32l4_cc1101_initialize * * Description: * Initialize and register the cc1101 radio driver * ****************************************************************************/ -int stm32_cc1101_initialize(void) +int stm32l4_cc1101_initialize(void) { FAR struct spi_dev_s *spi = NULL; FAR struct cc1101_dev_s *dev = NULL; diff --git a/configs/nucleo-l476rg/src/stm32_gpio.c b/configs/nucleo-l476rg/src/stm32_gpio.c index 9813e9405c..d79e28ba5c 100644 --- a/configs/nucleo-l476rg/src/stm32_gpio.c +++ b/configs/nucleo-l476rg/src/stm32_gpio.c @@ -264,7 +264,7 @@ static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable) ****************************************************************************/ /**************************************************************************** - * Name: stm32_gpio_initialize + * Name: stm32l4_gpio_initialize * * Description: * Initialize GPIO drivers for use with /apps/examples/gpio diff --git a/configs/nucleo-l476rg/src/stm32_lsm303agr.c b/configs/nucleo-l476rg/src/stm32_lsm303agr.c index 6c44e02b91..63a64ff3b0 100644 --- a/configs/nucleo-l476rg/src/stm32_lsm303agr.c +++ b/configs/nucleo-l476rg/src/stm32_lsm303agr.c @@ -60,7 +60,7 @@ ****************************************************************************/ /***************************************************************************** - * Name: stm32_lsm303agr_initialize + * Name: stm32l4_lsm303agr_initialize * * Description: * Initialize I2C-based LSM303AGR. diff --git a/configs/nucleo-l476rg/src/stm32_lsm6dsl.c b/configs/nucleo-l476rg/src/stm32_lsm6dsl.c index c70424b18a..06b894d44a 100644 --- a/configs/nucleo-l476rg/src/stm32_lsm6dsl.c +++ b/configs/nucleo-l476rg/src/stm32_lsm6dsl.c @@ -1,5 +1,5 @@ /***************************************************************************** - * configs/stm32l476rg/src/stm32_lsm6dsl.c + * configs/nucleo-l476rg/src/stm32_lsm6dsl.c * * Copyright (C) 2018 Greg Nutt. All rights reserved. * Author: Alan Carvalho de Assis @@ -60,7 +60,7 @@ ****************************************************************************/ /***************************************************************************** - * Name: stm32_lsm6dsl_initialize + * Name: stm32l4_lsm6dsl_initialize * * Description: * Initialize I2C-based LSM6DSL. diff --git a/configs/nucleo-l476rg/src/stm32_pwm.c b/configs/nucleo-l476rg/src/stm32_pwm.c index 3db43caacf..f0e1aa709d 100644 --- a/configs/nucleo-l476rg/src/stm32_pwm.c +++ b/configs/nucleo-l476rg/src/stm32_pwm.c @@ -73,14 +73,14 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32_pwm_setup + * Name: stm32l4_pwm_setup * * Description: * Initialize PWM and register the PWM device. * ************************************************************************************/ -int stm32_pwm_setup(void) +int stm32l4_pwm_setup(void) { static bool initialized = false; struct pwm_lowerhalf_s *pwm; diff --git a/configs/nucleo-l476rg/src/stm32_spimmcsd.c b/configs/nucleo-l476rg/src/stm32_spimmcsd.c index 19216ce24e..f822a02195 100644 --- a/configs/nucleo-l476rg/src/stm32_spimmcsd.c +++ b/configs/nucleo-l476rg/src/stm32_spimmcsd.c @@ -1,5 +1,5 @@ /***************************************************************************** - * configs/stm32f103-minimum/src/stm32_mmcsd.c + * configs/nucleo-l476rg/src/stm32_spimmcsd.c * * Copyright (C) 2018 Greg Nutt. All rights reserved. * Author: Alan Carvalho de Assis @@ -81,24 +81,26 @@ static const int SD_SLOT_NO = 0; /* There is only one SD slot */ ****************************************************************************/ /***************************************************************************** - * Name: stm32_spi1register + * Name: stm32l4_spi1register * * Description: * Registers media change callback + * ****************************************************************************/ int stm32l4_spi1register(struct spi_dev_s *dev, spi_mediachange_t callback, - void *arg) + void *arg) { spiinfo("INFO: Registering spi1 device\n"); return OK; } /***************************************************************************** - * Name: stm32_mmcsd_initialize + * Name: stm32l4_mmcsd_initialize * * Description: * Initialize SPI-based SD card and card detect thread. + * ****************************************************************************/ int stm32l4_mmcsd_initialize(int minor) diff --git a/configs/nucleo-l476rg/src/stm32_timer.c b/configs/nucleo-l476rg/src/stm32_timer.c index 9f578b5bc6..1381f0d089 100644 --- a/configs/nucleo-l476rg/src/stm32_timer.c +++ b/configs/nucleo-l476rg/src/stm32_timer.c @@ -1,5 +1,5 @@ /**************************************************************************** - * config/nucleo-l476rg/src/stm32_timer.c + * configs/nucleo-l476rg/src/stm32_timer.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/configs/nucleo-l476rg/src/stm32_userleds.c b/configs/nucleo-l476rg/src/stm32_userleds.c index 9464a6ad34..4661e2caff 100644 --- a/configs/nucleo-l476rg/src/stm32_userleds.c +++ b/configs/nucleo-l476rg/src/stm32_userleds.c @@ -197,11 +197,11 @@ void board_userled_all(uint8_t ledset) } /**************************************************************************** - * Name: stm32_led_pminitialize + * Name: stm32l4_led_pminitialize ****************************************************************************/ #ifdef CONFIG_PM -void stm32_led_pminitialize(void) +void stm32l4_led_pminitialize(void) { /* Register to receive power management callbacks */