xiaoxiang781216 commented on code in PR #16783: URL: https://github.com/apache/nuttx/pull/16783#discussion_r2236365086
########## arch/arm/include/samv7/irq.h: ########## @@ -65,7 +65,7 @@ #define SAM_IRQ_EXTINT (16) /* Vector number of the first external interrupt */ -#if defined(CONFIG_ARCH_CHIP_SAMV71) +#if defined(CONFIG_ARCH_CHIP_SAMV71) || defined (CONFIG_ARCH_CHIP_PIC32CZCA70) Review Comment: remove space before (CONFIG_ARCH_CHIP_PIC32CZCA70) ########## arch/arm/include/samv7/chip.h: ########## @@ -375,6 +375,129 @@ # define SAMV7_NACC 1 /* 1 Analog comparator */ # define SAMV7_NETM 1 /* 1 Embedded Trace Macrocell (ETM) */ +/* PIC32CZCA70 - 2048 Kbytes FLASH / 512 Kbytes SRAM + * + * These microcontrollers are fully pin-to-pin compatible with + * SAME70/S70/V70/V71 family of microcontrollers, but they offer + * enhanced memory capabilities. The code written for SAM series + * should be binary compatible with PIC32CZ CA70/MC70 series. + * + * NOTE: CA80/CA90 is not compatible, these are completely different chips. + */ + +#elif defined(CONFIG_ARCH_CHIP_PIC32CZCA70) + +#define SAMV7_FLASH_SIZE (2048*1024) +#define SAMV7_SRAM_SIZE (512*1024) + +#define SAMV7_BSRAM_SIZE (1*1024) Review Comment: add two spaces before `define` ########## arch/arm/src/samv7/hardware/sam_pinmap.h: ########## @@ -29,7 +29,7 @@ #include <nuttx/config.h> -#if defined(CONFIG_ARCH_CHIP_SAMV71) +#if defined(CONFIG_ARCH_CHIP_SAMV71) || defined (CONFIG_ARCH_CHIP_PIC32CZCA70) Review Comment: ditto ########## arch/arm/src/samv7/hardware/sam_memorymap.h: ########## @@ -29,7 +29,7 @@ #include <nuttx/config.h> -#if defined(CONFIG_ARCH_CHIP_SAMV71) +#if defined(CONFIG_ARCH_CHIP_SAMV71) || defined (CONFIG_ARCH_CHIP_PIC32CZCA70) Review Comment: ditto ########## boards/arm/samv7/pic32czca70-curiosity/src/sam_buttons.c: ########## @@ -0,0 +1,203 @@ +/**************************************************************************** + * boards/arm/samv7/pic32czca70-curiosity/src/sam_buttons.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 <stdint.h> +#include <errno.h> + +#include <nuttx/arch.h> +#include <nuttx/board.h> +#include <nuttx/irq.h> +#include <arch/board/board.h> + +#include "arm_internal.h" +#include "sam_gpio.h" +#include "hardware/sam_matrix.h" +#include "sam_board.h" + +#ifdef CONFIG_ARCH_BUTTONS + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifdef CONFIG_ARCH_IRQBUTTONS +# define HAVE_IRQBUTTONS 1 +# if !defined(CONFIG_SAMV7_GPIOA_IRQ) +# undef HAVE_IRQBUTTONS +# endif +#endif + +const uint32_t gpio_pins[NUM_BUTTONS] = + { Review Comment: why make so big indent ########## arch/arm/src/samv7/sam_periphclks.h: ########## @@ -29,7 +29,7 @@ #include <nuttx/config.h> -#if defined(CONFIG_ARCH_CHIP_SAMV71) +#if defined(CONFIG_ARCH_CHIP_SAMV71) || defined (CONFIG_ARCH_CHIP_PIC32CZCA70) Review Comment: ditto ########## boards/arm/samv7/pic32czca70-curiosity/src/sam_buttons.c: ########## @@ -0,0 +1,203 @@ +/**************************************************************************** + * boards/arm/samv7/pic32czca70-curiosity/src/sam_buttons.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 <stdint.h> +#include <errno.h> + +#include <nuttx/arch.h> +#include <nuttx/board.h> +#include <nuttx/irq.h> +#include <arch/board/board.h> + +#include "arm_internal.h" +#include "sam_gpio.h" +#include "hardware/sam_matrix.h" +#include "sam_board.h" + +#ifdef CONFIG_ARCH_BUTTONS + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifdef CONFIG_ARCH_IRQBUTTONS +# define HAVE_IRQBUTTONS 1 +# if !defined(CONFIG_SAMV7_GPIOA_IRQ) +# undef HAVE_IRQBUTTONS +# endif +#endif + +const uint32_t gpio_pins[NUM_BUTTONS] = + { + GPIO_SW0, + GPIO_SW1, + }; +const uint32_t gpio_pins_int[NUM_BUTTONS] = + { Review Comment: ditto -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org