pkarashchenko commented on code in PR #6057: URL: https://github.com/apache/incubator-nuttx/pull/6057#discussion_r851936452
########## arch/arm/src/stm32h7/stm32_fdcan_sock.c: ########## @@ -0,0 +1,2433 @@ +/**************************************************************************** + * arch/arm/src/stm32h7/stm32_fdcan_sock.c + * + * 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 <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <string.h> +#include <time.h> +#include <unistd.h> +#include <debug.h> +#include <errno.h> + +#include <nuttx/can.h> +#include <nuttx/wdog.h> +#include <nuttx/irq.h> +#include <nuttx/arch.h> +#include <nuttx/wqueue.h> +#include <nuttx/signal.h> +#include <nuttx/net/netdev.h> +#include <nuttx/net/can.h> + +#ifdef CONFIG_NET_CAN_RAW_TX_DEADLINE +#include <sys/time.h> +#endif + +#include <arch/board/board.h> + +#include "arm_internal.h" +#include "chip.h" +#include "stm32.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define CAN_STD_MASK 0x000007ff +#define CAN_EXT_MASK 0x1fffffff +#define CAN_EXT_FLAG (1 << 31) /* Extended frame format */ +#define CAN_RTR_FLAG (1 << 30) /* Remote transmission request */ +#define CAN_ERR_FLAG (1 << 29) /* Error state indicator */ Review Comment: I think those are already defined in `include/netpacket/can.h` together with `MASK`s, so please remove definitions from here and include a header instead. -- 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]
