Description bMS_VendorCode is incorrectly configured. Change it to
USB_REQ_GETMSFTOSDESCRIPTOR(0xee), which is the same as the request
processing logic for GET_MS_DESCRIPTOR in the code
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
In usbclass_unbind, DEV_FREEEP is called first, and later
usbclass_freereq does not free memory due to ep NULL
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
Add COMPOSITE_DEVICES configuration so that external composite
devices can also know the maximum number of supported classes.
The default COMPOSITE_DEVICES number is 8.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
The enumeration process for composite and non-composite devices
has a lot of duplicate code. Treating the code for composite
devices as universal enumeration code can reduce redundant code.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
when the size of the usb configuration descriptor
is a multiple of 64 integers, only for this size less than wlength,
host do need send ZLP
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
config value changed after resetconfig was executed
endpoint will stay disable state after setinterface cmd
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
unbind will call the adb_char_on_connect interface to wake up the adbd task,
adbd will then access the adb device and fail to return, at this time it will
close the adb device, we can do the final memory release operation in the
second unbind
Signed-off-by: dinglongfei <dinglongfei@xiaomi.com>
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>
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>
- 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>
- 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>