zhangyuan21
0cb8fdfe83
usbdev: set ep0 priv only not define CONFIG_USBDEV_COMPOSITE
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-02 17:42:28 -03:00
zhangyuan21
9893bfd45a
rndis: fixed wrong incorrect macro definition
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-02 17:42:28 -03:00
chao an
6ee9ec7656
build: add initial cmake build system
...
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)
------------------
How to test
From within nuttx/. Configure:
cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja
(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja
This uses ninja generator (install with sudo apt install ninja-build). To build:
$ cmake --build build
menuconfig:
$ cmake --build build -t menuconfig
--------------------------
2. cmake/build: reformat the cmake style by cmake-format
https://github.com/cheshirekow/cmake_format
$ pip install cmakelang
$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done
Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
simbit18
f0a74eb492
Fix Kconfig style
...
Remove spaces from Kconfig files
2023-06-22 11:46:09 +09:00
raiden00pl
387944b837
usbdev/cdcacm.c: register console only for device with minor number 0
...
With this change, we can register several CDCACM devices where one is used as a console
2023-06-14 16:24:20 -03:00
Petro Karashchenko
2a38c38b03
style: fix style issues found during code review
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 12:54:52 +08:00
Xiang Xiao
7990f90915
Indent the define statement by two spaces
...
follow the code style convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-21 09:52:08 -03:00
Xiang Xiao
6f6fce95a2
Replace all sprintf with snprintf
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
raiden00pl
478f2f3d5f
rndis: move private definitions from a public header to the source file
2023-03-31 08:17:01 +09:00
raiden00pl
58e817db76
rndis: do not configure endpoints from Kconfig when composite enabled
...
This should be done from a board specific logic, as for other composite devices
2023-03-31 08:17:01 +09:00
raiden00pl
bed53538e8
rndis: EP0 belongs to composite class if composite enabled
2023-03-28 19:43:56 -03:00
raiden00pl
8de2197773
rndis: exclude the logic that belongs to composite
2023-03-28 19:43:56 -03:00
raiden00pl
cb05700acf
rndis: interface association descriptor should depend on CONFIG_COMPOSITE_IAD
2023-03-28 19:43:56 -03:00
raiden00pl
10f1d3e76e
rndis: fix dev info init for composite
2023-03-28 19:43:56 -03:00
raiden00pl
9b70e010dc
rndis: refactor usbdev_rndis_get_composite_devdesc to make it more like in other composite drivers
2023-03-28 19:43:56 -03:00
raiden00pl
50cf84c99a
usbdev-composite: ep0 submit should be send only once for the composite class
2023-03-24 14:54:31 -03:00
raiden00pl
d014b9d384
rndis: use composite_ep0submit to send the ep0 when composite
2023-03-24 14:54:31 -03:00
raiden00pl
6caa9317f6
usbmsc: do not send deferred response if we are part of the composite device
...
EP0 is owned by the composite class so it shouldn't be directly accessed by usbmsc
2023-03-24 14:52:50 -03:00
Xiang Xiao
d9a8d5f2ee
usb/cdcacm: Remove the process for tc_iflag, tc_oflag and tc_lflag
...
since the common code in serial.c already handle them correctly:
https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L1556-L1601
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-19 14:54:59 -06:00
zhangyuan21
699c930987
drivers/usb: fixed sim usb dev and host build issue
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-03 14:31:30 -03:00
zhanghongyu
16ea80e53b
rndis: support iob offload
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-03-02 02:50:59 +08:00
zhangyuan21
528dce4f7f
usbdev/adb: fixed adb build issue
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-27 01:30:19 +08:00
zhangyuan21
32513cedf0
usbdev/adb: add adb usbclass_unbind function
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-14 22:20:12 +08:00
zhangyuan21
b4aa5b0d0b
usbdev: fixed DUALSPEED issue for adb/cdcecm/rndis
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-13 18:47:42 +08:00
zhangyuan21
8f4cb0fec3
rndis: add endpoint configure
...
ep3 is not avaliable in dummy hcd, so need to
make the endpoint number configurable.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:38:11 +08:00
zhangyuan21
f77a824105
usbdev/composite: remove excess uninitialize code
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:37:21 +08:00
chao an
7625126c91
Remove the remain MIN/MAX like macro
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-03 23:22:41 +08:00
Gustavo Henrique Nihei
e6b204f438
nuttx: Use MIN/MAX definitions from "sys/param.h"
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
Nathan Hartman
6b89b6f945
Remove executable permissions from source files
...
* arch/arm/src/sama5/sam_flexcom_spi.h,
arch/risc-v/src/mpfs/mpfs_ihc_sbi.c,
drivers/usbdev/adb.c,
libs/libc/math/lib_scalbn.c,
libs/libc/math/lib_scalbnf.c,
net/ipfrag/Make.defs,
net/ipfrag/ipfrag.c,
net/ipfrag/ipfrag.h,
net/ipfrag/ipv4_frag.c,
net/ipfrag/ipv6_frag.c: Remove executable permission.
2023-01-30 20:34:51 -03:00
Xiang Xiao
b0a0ba3ad7
fs: Move mmap callback before truncate in [file|mountpt]_operations
...
since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
Xiang Xiao
779a610ca3
Remove the unnecessary NULL fields in global instance definition of file_operations
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 00:32:13 +02:00
Jukka Laitinen
f33dc4df3f
Change FIOC_MMAP into file operation call
...
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
41e9df2f3e
Add ftruncate into file operation calls
...
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Xiang Xiao
7322eafba7
drivers/usb: Fix the typo error in Kconfig
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-25 01:01:26 +02:00
Petro Karashchenko
b107e4f417
nuttx: unify MIN, MAX and ABS macro definition across the code
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 09:31:28 +08:00
Xiang Xiao
d5689e070b
net/arp: Remove nuttx/net/arp.h
...
1.move ARPHRD_ETHER to netinet/arp.h
1.move arp_entry_s to net/arp/arp.h
2.move arp_input to nuttx/net/netdev.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 22:10:59 +02:00
zhangyuan21
5dc4e23bb7
usbdev/adb: fixed usbclass steup issue
...
1. set usbdev when usb class bind
2. don't call EP_SUBMIT when receive OUT message
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-07 12:24:09 +08:00
sunkun3
d9acaeaccf
usbdev:resolve ADB compilation errors
...
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
2022-12-07 12:24:09 +08:00
Xiang Xiao
c6e9edcbb6
net: Rename arp_arpin to arp_input
...
align with other similar function(e.g. ipv4_input and ipv6_input)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-04 20:39:21 +08:00
chao an
6fa60627eb
net/devif/ip: build l2 header on the IP layer
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:13:45 +08:00
chao an
8850dee746
net/devif: move preprocess of txpoll into common code
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:11:12 +08:00
yinshengkai
85f727f232
tools: replace INCDIR to Makefile variable
...
In the past, header file paths were generated by the incdir command
Now they are generated by concatenating environment variables
In this way, when executing makefile, no shell command will be executed,
it will improve the speed of executing makfile
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-03 19:59:55 +08:00
Xiang Xiao
929882862b
Fix usbdev/usbmsc_desc.c:316:7: error: variable 'length' set but not used [-Werror,-Wunused-but-set-variable]
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
anjiahao
5724c6b2e4
sem:remove sem default protocl
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +08:00
Xiang Xiao
dca5a3483f
drivers: Destroy mutex and sem in the error path
...
also correct the order to ensure the memory free is last step
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
anjiahao
d1d46335df
Replace nxsem API when used as a lock with nxmutex API
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
Xiang Xiao
40ef5bc6db
libc: Move queue.h from include to include/nuttx
...
to avoid the conflict with libuv's queue.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-26 08:04:58 +02:00
wangbowen6
344c8be049
poll: add poll_notify() api and call it in all drivers
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-09-26 12:06:32 +08:00
Xiang Xiao
2166c98809
Add printflike and scanflike to all printf/scanf like functions
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 14:14:36 +03:00
Gustavo Henrique Nihei
e999708b31
drivers: Convert DEBUGASSERT(false) into more intuitive DEBUGPANIC()
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-07-14 12:08:45 +08:00