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 020afe17215ce6ce738e4b655c1d83bba9130a52 Author: raiden00pl <[email protected]> AuthorDate: Tue Nov 3 11:00:24 2026 +0100 boards/nucleo-l432kc: Register the timers with the board common code. TIM2 was registered as /dev/timer0 by the board. The board common BOARD_STM32_COMMON_TIM2_TIMER option registers it as /dev/timer2. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: raiden00pl <[email protected]> --- .../arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt | 4 -- boards/arm/stm32l4/nucleo-l432kc/src/Make.defs | 4 -- .../arm/stm32l4/nucleo-l432kc/src/nucleo-l432kc.h | 12 ---- .../arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c | 12 ---- boards/arm/stm32l4/nucleo-l432kc/src/stm32_timer.c | 67 ---------------------- 5 files changed, 99 deletions(-) diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt b/boards/arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt index 683ac89ad48..1e30c830219 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt +++ b/boards/arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt @@ -76,10 +76,6 @@ if(CONFIG_SENSORS_ZEROCROSS) list(APPEND SRCS stm32_zerocross.c) endif() -if(CONFIG_TIMER) - list(APPEND SRCS stm32_timer.c) -endif() - if(CONFIG_BOARDCTL_IOCTL) list(APPEND SRCS stm32_ioctl.c) endif() diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/Make.defs b/boards/arm/stm32l4/nucleo-l432kc/src/Make.defs index d6265c54897..de446d83d74 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/Make.defs +++ b/boards/arm/stm32l4/nucleo-l432kc/src/Make.defs @@ -76,10 +76,6 @@ ifeq ($(CONFIG_SENSORS_ZEROCROSS),y) CSRCS += stm32_zerocross.c endif -ifeq ($(CONFIG_TIMER),y) -CSRCS += stm32_timer.c -endif - ifeq ($(CONFIG_BOARDCTL_IOCTL),y) CSRCS += stm32_ioctl.c endif diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/nucleo-l432kc.h b/boards/arm/stm32l4/nucleo-l432kc/src/nucleo-l432kc.h index 8158cf82fb1..9cc37ca9d1e 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/nucleo-l432kc.h +++ b/boards/arm/stm32l4/nucleo-l432kc/src/nucleo-l432kc.h @@ -287,18 +287,6 @@ int stm32_ina219initialize(const char *devpath); int stm32_zerocross_initialize(void); #endif -/**************************************************************************** - * Name: board_timer_driver_initialize - * - * Description: - * Initialize and register a timer - * - ****************************************************************************/ - -#ifdef CONFIG_TIMER -int board_timer_driver_initialize(const char *devpath, int timer); -#endif - /**************************************************************************** * Name: stm32_qencoder_initialize * diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c index a619fd7b13f..7415c352dda 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c @@ -238,18 +238,6 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_TIMER - /* Initialize and register the timer driver */ - - ret = board_timer_driver_initialize("/dev/timer0", 2); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to register the timer driver: %d\n", - ret); - return ret; - } -#endif - #ifdef CONFIG_SENSORS_QENCODER /* Initialize and register the qencoder driver */ diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_timer.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_timer.c deleted file mode 100644 index 50a21574bff..00000000000 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_timer.c +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/nucleo-l432kc/src/stm32_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include <nuttx/config.h> -#include <nuttx/timers/timer.h> - -#include <nuttx/debug.h> - -#include "stm32_tim.h" -#include "nucleo-l432kc.h" - -#ifdef CONFIG_TIMER - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_timer_driver_initialize - * - * Description: - * Configure the timer driver. - * - * Input Parameters: - * devpath - The full path to the timer device. This should be of the - * form /dev/timer0 - * timer - The timer's number. - * - * Returned Value: - * Zero (OK) is returned on success; A negated errno value is returned - * to indicate the nature of any failure. - * - ****************************************************************************/ - -int board_timer_driver_initialize(const char *devpath, int timer) -{ - return stm32_timer_initialize(devpath, timer); -} - -#endif
