linguini1 commented on code in PR #18907: URL: https://github.com/apache/nuttx/pull/18907#discussion_r3294663097
########## boards/arm64/am62x/pocketbeagle2/include/board.h: ########## @@ -0,0 +1,100 @@ +/**************************************************************************** + * boards/arm64/am62x/pocketbeagle2/include/board.h + * + * 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. + * + ****************************************************************************/ + +/* PocketBeagle 2 board definitions */ + +#ifndef __BOARDS_ARM64_AM62X_POCKETBEAGLE2_INCLUDE_BOARD_H +#define __BOARDS_ARM64_AM62X_POCKETBEAGLE2_INCLUDE_BOARD_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <nuttx/config.h> + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Clocking *****************************************************************/ + +/* UART functional clock, sourced from HSDIV4_CLKOUT1 as configured by the + * R5 SYSFW. Matches AM62X_UART_SCLK in hardware/am62x_uart.h. + */ + +#define BOARD_UART_SCLK 48000000ul /* 48 MHz */ + +/* ARM Generic Timer (CNTPCT_EL0) reference clock. + * On AM62x this is driven by the 200 MHz SYSCLK0 / 4 path. + * Configured in defconfig via CONFIG_ARCH_TIMER_FREQ. + */ + +#define BOARD_ARCH_TIMER_FREQ 200000000ul /* 200 MHz */ + +/* LED definitions ********************************************************* + * + * PocketBeagle 2 user LEDs are connected to GPIO pins on the AM6254. + * The exact GPIO numbers will be finalised when the GPIO driver is added; + * these defines are placeholders so board code can compile now. + * + * LED index Colour Net name + * 0 USR0 Green + * 1 USR1 Yellow/Amber + * 2 USR2 Red + */ + +typedef enum +{ + BOARD_LED_USR0 = 0, + BOARD_LED_USR1 = 1, + BOARD_LED_USR2 = 2, + BOARD_NLEDS, +} led_typedef_enum; Review Comment: I suggest macros -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
