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 46f7fce93096f134e8a7faae708714cb784e3eee
Author: Kerogit <[email protected]>
AuthorDate: Tue Jan 13 00:16:07 2026 +0100

    arch/avr/src/avrdx: rename configuration options to match preferred naming
    
    As discussed previously, the preferred naming for configuration options
    uses the word HAVE instead of HAS even when describing singular feature.
    
    This patch changes the names of some configuration options accordingly.
    It only applies to those that will be used in following patches
    in this series.
    
    The change was tested by building buttons example application
    (breadxavr:buttons) for AVR128DA64.
    
    Signed-off-by: Kerogit <[email protected]>
---
 arch/avr/src/avrdx/Kconfig              | 18 +++++++++---------
 arch/avr/src/avrdx/avrdx_gpio.h         |  6 +++---
 arch/avr/src/avrdx/avrdx_gpio_isr_mux.c | 12 ++++++------
 arch/avr/src/avrdx/avrdx_peripherals.c  |  6 +++---
 4 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/arch/avr/src/avrdx/Kconfig b/arch/avr/src/avrdx/Kconfig
index dcfe1e674d8..931f68e75ff 100644
--- a/arch/avr/src/avrdx/Kconfig
+++ b/arch/avr/src/avrdx/Kconfig
@@ -59,15 +59,15 @@ config AVR_HAVE_USART5_ALT1
                Chip has alternate pin position for USART 5
 
 # Available I/O ports (only those not common for all devices)
-config AVR_HAS_PORTB
+config AVR_HAVE_PORTB
        bool
        default n
 
-config AVR_HAS_PORTE
+config AVR_HAVE_PORTE
        bool
        default n
 
-config AVR_HAS_PORTG
+config AVR_HAVE_PORTG
        bool
        default n
 
@@ -110,9 +110,9 @@ config ARCH_CHIP_AVR128DA64
        select AVR_HAVE_USART4_ALT1
        select AVR_HAVE_USART_5
        select AVR_HAVE_USART5_ALT1
-       select AVR_HAS_PORTB
-       select AVR_HAS_PORTE
-       select AVR_HAS_PORTG
+       select AVR_HAVE_PORTB
+       select AVR_HAVE_PORTE
+       select AVR_HAVE_PORTG
        select AVR_HAVE_TWI0_ALT1
        select AVR_HAVE_TWI1
        select AVR_HAVE_TWI1_ALT1
@@ -130,9 +130,9 @@ config ARCH_CHIP_AVR128DB64
        select AVR_HAVE_USART4_ALT1
        select AVR_HAVE_USART_5
        select AVR_HAVE_USART5_ALT1
-       select AVR_HAS_PORTB
-       select AVR_HAS_PORTE
-       select AVR_HAS_PORTG
+       select AVR_HAVE_PORTB
+       select AVR_HAVE_PORTE
+       select AVR_HAVE_PORTG
        select AVR_HAVE_TWI0_ALT1
        select AVR_HAVE_TWI1
        select AVR_HAVE_TWI1_ALT1
diff --git a/arch/avr/src/avrdx/avrdx_gpio.h b/arch/avr/src/avrdx/avrdx_gpio.h
index 27ed5bc67dc..172ac7dc776 100644
--- a/arch/avr/src/avrdx/avrdx_gpio.h
+++ b/arch/avr/src/avrdx/avrdx_gpio.h
@@ -43,15 +43,15 @@
 #define AVRDX_GPIO_PORTD_IDX 3
 #define AVRDX_GPIO_PORTF_IDX 5
 
-#ifdef CONFIG_AVR_HAS_PORTB
+#ifdef CONFIG_AVR_HAVE_PORTB
 #  define AVRDX_GPIO_PORTB_IDX 1
 #endif
 
-#ifdef CONFIG_AVR_HAS_PORTE
+#ifdef CONFIG_AVR_HAVE_PORTE
 #  define AVRDX_GPIO_PORTE_IDX 4
 #endif
 
-#ifdef CONFIG_AVR_HAS_PORTG
+#ifdef CONFIG_AVR_HAVE_PORTG
 #  define AVRDX_GPIO_PORTG_IDX 6
 #endif
 
diff --git a/arch/avr/src/avrdx/avrdx_gpio_isr_mux.c 
b/arch/avr/src/avrdx/avrdx_gpio_isr_mux.c
index 7c66d111919..0524bc00925 100644
--- a/arch/avr/src/avrdx/avrdx_gpio_isr_mux.c
+++ b/arch/avr/src/avrdx/avrdx_gpio_isr_mux.c
@@ -116,21 +116,21 @@ static int avrdx_gpio_isr_mux(int irq, void *context, FAR 
void *arg)
       port_index = AVRDX_GPIO_PORTF_IDX;
     }
 
-#ifdef CONFIG_AVR_HAS_PORTB
+#ifdef CONFIG_AVR_HAVE_PORTB
   else if (irq8 == AVRDX_IRQ_PORTB_PORT)
     {
       port_index = AVRDX_GPIO_PORTB_IDX;
     }
 #endif
 
-#ifdef CONFIG_AVR_HAS_PORTE
+#ifdef CONFIG_AVR_HAVE_PORTE
   else if (irq8 == AVRDX_IRQ_PORTE_PORT)
     {
       port_index = AVRDX_GPIO_PORTE_IDX;
     }
 #endif
 
-#ifdef CONFIG_AVR_HAS_PORTG
+#ifdef CONFIG_AVR_HAVE_PORTG
   else if (irq8 == AVRDX_IRQ_PORTG_PORT)
     {
       port_index = AVRDX_GPIO_PORTG_IDX;
@@ -213,7 +213,7 @@ int avrdx_irq_attach_gpio_mux(uint8_t port_idx, uint8_t 
pins,
 
   first_free_slot = GPIO_MUX_MAX_CHANNELS; /* No free slot was found yet */
 
-#ifdef AVR_HAS_PORTG
+#ifdef AVR_HAVE_PORTG
   if (port_idx > AVRDX_GPIO_PORTG_IDX)
     {
       return -EINVAL;
@@ -340,7 +340,7 @@ int avrdx_irq_detach_gpio_mux(uint8_t port_idx, uint8_t 
pins,
   int ret;
   uint8_t i;
 
-#ifdef AVR_HAS_PORTG
+#ifdef AVR_HAVE_PORTG
   if (port_idx > AVRDX_GPIO_PORTG_IDX)
     {
       return -EINVAL;
@@ -408,7 +408,7 @@ errout_lcs:
 
 void avrdx_gpio_isr_mux_init(void)
 {
-#ifdef AVR_HAS_PORTG
+#ifdef AVR_HAVE_PORTG
   g_gpio_pin_isrs = (struct gpio_pin_isr_s **) kmm_zalloc \
       (sizeof(struct gpio_pin_isr_s *) * (AVRDX_GPIO_PORTG_IDX + 1));
 #else
diff --git a/arch/avr/src/avrdx/avrdx_peripherals.c 
b/arch/avr/src/avrdx/avrdx_peripherals.c
index 2cc260b9440..7fbb791c65b 100644
--- a/arch/avr/src/avrdx/avrdx_peripherals.c
+++ b/arch/avr/src/avrdx/avrdx_peripherals.c
@@ -152,7 +152,7 @@ const IOBJ uint8_t avrdx_gpio_irq_vectors[] =
 {
   AVRDX_IRQ_PORTA_PORT,
 
-#ifdef CONFIG_AVR_HAS_PORTB
+#ifdef CONFIG_AVR_HAVE_PORTB
   AVRDX_IRQ_PORTB_PORT,
 #else
   0,
@@ -160,7 +160,7 @@ const IOBJ uint8_t avrdx_gpio_irq_vectors[] =
 
   AVRDX_IRQ_PORTC_PORT,
   AVRDX_IRQ_PORTD_PORT,
-#ifdef CONFIG_AVR_HAS_PORTE
+#ifdef CONFIG_AVR_HAVE_PORTE
   AVRDX_IRQ_PORTE_PORT,
 #else
   0,
@@ -168,7 +168,7 @@ const IOBJ uint8_t avrdx_gpio_irq_vectors[] =
 
   AVRDX_IRQ_PORTF_PORT
 
-#ifdef CONFIG_AVR_HAS_PORTG
+#ifdef CONFIG_AVR_HAVE_PORTG
   , AVRDX_IRQ_PORTG_PORT
 #else
   , 0

Reply via email to