btashton commented on a change in pull request #2158: URL: https://github.com/apache/incubator-nuttx/pull/2158#discussion_r514164712
########## File path: arch/sim/src/sim/up_linuxi2c_host.h ########## @@ -0,0 +1,101 @@ +/**************************************************************************** + * arch/sim/src/sim/up_linuxi2c_host.h + * + * 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. + * + ****************************************************************************/ + +#ifndef _ARCH_SIM_SRC_SIM_LINUXI2C_HOST_H_ +#define _ARCH_SIM_SRC_SIM_LINUXI2C_HOST_H_ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <errno.h> +#include <stdint.h> + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Linux msg flags */ + +#define LINUX_I2C_M_RD 0x0001 Review comment: Two issues: 1) I don't want to require the kernel headers if possible. 2) We have to deal with an interface between Linux and NuttX and have a naming conflict this make it much easier to map by being able to prefix the structs and defines. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org