move usrsock_dev.c to driver folder

Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
This commit is contained in:
liangchaozhong 2022-09-09 20:58:51 +08:00 committed by Xiang Xiao
parent 3a023f4d1a
commit 5ec4296553
6 changed files with 65 additions and 1 deletions

View File

@ -51,3 +51,4 @@ source "drivers/rc/Kconfig"
source "drivers/motor/Kconfig"
source "drivers/math/Kconfig"
source "drivers/segger/Kconfig"
source "drivers/usrsock/Kconfig"

View File

@ -69,6 +69,7 @@ include 1wire/Make.defs
include rf/Make.defs
include rc/Make.defs
include segger/Make.defs
include usrsock/Make.defs
ifeq ($(CONFIG_SPECIFIC_DRIVERS),y)
-include platform/Make.defs

28
drivers/usrsock/Kconfig Normal file
View File

@ -0,0 +1,28 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
if NET_USRSOCK
menu "Usrsock Driver Support"
choice
prompt "Select usrsock device interface"
default NET_USRSOCK_DEVICE
config NET_USRSOCK_DEVICE
bool "/dev/usrsock"
---help---
Will export /dev/usrsock device node for usrsock request/response operations
config NET_USRSOCK_CUSTOM
bool "Customerized interface"
---help---
Will send usrsock request or receive usrsock response via other kind of interface
endchoice
endmenu
endif # NET_USRSOCK

34
drivers/usrsock/Make.defs Normal file
View File

@ -0,0 +1,34 @@
############################################################################
# drivers/usrsock/Make.defs
#
# 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.
#
############################################################################
ifeq ($(CONFIG_NET_USRSOCK),y)
# Include usrsock device drivers
ifeq ($(CONFIG_NET_USRSOCK_DEVICE),y)
CSRCS += usrsock_dev.c
endif
# Include User Socket Driver build support
DEPPATH += --dep-path usrsock
VPATH += :usrsock
endif

View File

@ -23,7 +23,7 @@
ifeq ($(CONFIG_NET_USRSOCK),y)
NET_CSRCS += usrsock_close.c usrsock_conn.c usrsock_bind.c usrsock_connect.c
NET_CSRCS += usrsock_dev.c usrsock_getpeername.c usrsock_devif.c
NET_CSRCS += usrsock_getpeername.c usrsock_devif.c
NET_CSRCS += usrsock_event.c usrsock_getsockname.c usrsock_getsockopt.c
NET_CSRCS += usrsock_poll.c usrsock_recvmsg.c usrsock_sendmsg.c
NET_CSRCS += usrsock_setsockopt.c usrsock_socket.c usrsock_sockif.c