network_stack_hierarchical_view
2020-11-28 21:44:00 0 举报
流程图
作者其他创作
大纲/内容
Pinctrl conf
主机控制器驱动(HCD)
MDIOmaster
Composite Framework
File storage
g_supported_functions
SoC dtsi
usb_balong_init
queue
网络时间
控制器驱动层
enable_store
API层
muxsetting
Get_frame
.pullup
device0 { compatible = \
ARP
label
App
device_create
Property
Unflatten
/{ compatible = \
INIT_DELAYED_WORK
packet sniffer
spi0
udc_bind_to_driver
omap_udc
Device Initialisation
网络、文件系统或块I/O子系统
ARM Cortex-M系列
AF INET
file_storage
CDC Driver
property
Block Device
android_usb_function
.queue
ARM Cortex-A系列
芯片驱动
DTLS/TLS
Usb_ep
uart0: serial@ff180000 { compatible = \
Transport
网络授时时回写RTC
pax2xx_udc
Usb_ep_enableUsb_ep_alloc_requestUsb_ep_alloc_bufferUsb_ep_queueUsb_ep_set_haltUsb_ep_fifo_status...
powered
外设驱动
Character Device
Endpoint
Gadget Driver
通信协议BLE/WIFI/LowPAN/Zigbee/NB-IoT
自组网APIs
Compatiblemodel
内核功能
configsetting
.wakeup
.set_selfpowered
.disable
Ep_list
PMIC
structusb_composite_dev
......
Gadget层
硬件层
Usb_gadget_register_driver
pinctrl
usb_composite_probe
Gadget设备层Gadget Device layer
系统初始化
系统时间
开机网络授时、AT
device0
分析批量端点接收的数据,其中是否有SCSI等命令,并进行相应操作
UART
boardconfigration
系统上电
usb_gadget_ops
Device Driver
wakeup
USB Function :acm
usb_driver
.get_frame
ops
ethtool
udc_list
Usb_gadget_unregister_driver
轻量级内核
.udc_set_speed
代表一个USB设备
内核层
Physical
.free_request
address = 0
...
udc
dev->functions
TCP proto
APP1
serial@ff180000
中断管理
USB Device Controller
UDP proto
usb_deregister
设备功能驱动Function Driver
bootloader Processing(optional)
init
Device Driver
.dtb file
Ethernet
node
gadgetfs
usbbus
Gadget API
Netfilter
composite_bind
node-name[@unit-address]
bind
usb_add_function
Inetnet Protol
AF_NETLINK
WirelessDev Drv
Gadget Driver Registering Function
AF_PACKET
Live tree
Gadget设备驱动Gadget Device Driver
To further run-time processing(overlays etc)
1、初始化usb_gadget
初始化
2个address2个size
i2c@ff110000
IPv6
各种Gadget
USB设备驱动USB Device Driver
Modification
属于usb_gadget_driver中的bind()
Pinctrl mux
android_gadget_init
usb_balong_platform_hw_init
aliases { ethernet0 = &gmac; i2c0 = &i2c0; i2c1 = &i2c1; ...... serial0 = &uart0 ; serial1 = &uart1; ..... };
address
开机读取
Open APIs
reg = <0x0 0xff1c0000 0x0 0x1000>;
Gadget Framework
将组合设备中所涉及到的功能驱逐一动添加到该配置中
Compile
syscall
内存管理
Media (fiber/twisted pair/wireless...)
Statedefault
2、初始化usb_ep
将Gadget设备驱动与UDC设备控制器驱动相互关联起来
Stateilde
通过批量端点收发数据
接受主机命令,配置设备控制器
寻址属性
AF_INET6
MAC
&uart0
BridgeDrv
glibc/jvm/go runtime
android_init_functions
.set_halt
节点状态
int(*bind)(struct usb_gadget *)
Source file hierarchy
i2c1: i2c@ff110000 { compatible = \
Serial
reset
.dtb(modified)
HCD
.udc_start
Set_halt
Pinctrl core
configured
struct usb_gadget
board dts
端云互通协议CoAP/MQTT/LWM2M
.alloc_request
#size-cells = <0>;
spi0: spi@ff1c0000 { compatible = \
IPv4
USB Function :gnet
Alloc_buffer
child node
主机
UDC以链表的方式管理
usb_register
类设备驱动Class Driver
classless Qdisc
android_bind
USB Gadget Interface
Usb_gadget
寻址属性
Set_selfpowered
Function Driver
#address-cells = <1>;
udc->gadget
任务管理
Usb_gadget_frame_numberUsb_gadget_wakeupUsb_gadget_set_selfpoweredUsb_gadget_vbus_connectUsb_gadget_vbus_drawUsb_gadget_connect...
Alloc_request
Statesleep
Vbus_session
*ep0
Gadget Zero
1个address0个size
服务发现mDNS/CoRE-RD
enable
usb_ep
MDIOslave
uart0
root node
#address-cells = <2>;
udc_bind_to_driver
usb_device
3、注册设备device_register
HarmonyOS
driver->bind
属性标签
注册中断服务程序
USB Gadget Interface
Fragment/Reassemble
bsp_usb_insert_process
echo 1 > enable
gadget
USB线
reg = <0>
module dtsi
list_for_each_entry
USB设备控制器UDC
Traffic Control/Qos
composite->bind(cdev);
struct usb_composite_driver
应用Profile
#size-cells = <2>;
RTC
.set_wedge
设备
.dequeue
consumer interfaces
usb_gadget_probe_driver
多协议互联互通框架
文本
Kernel Processing
Load
Route/FIB
中断
网络协议栈LwIP
i2c1
usb_add_config
Netdev Layer
platform_driver_register (struct platform_driver *udc)
控制器驱动
UDC Core
.enable
查 找 合 适 的 端 点
EthernetDev Drv
udc->probe()
dev->functions = g_supported_functions;
list
.udc_stop
Suspended
接受USB总线
static struct usb_composite_driver g_android_usb_driver = { .name = \"android_usb\
根据命令进行数据操作,并将结果通过BULK IN端点返回给主机
Pinctrlinterfaces
PHY
USB
pullup
主机通过控制端点对设备进行地址配置
Gadget驱动
LIBC/ZLIB
找到了
composite Framework
usb_plug_event_handler
设备控制器驱动(UCD)
struct usb_composite_driver
控制器的抽象
struct usb_gadget_driver
应用层
sys/devices/virtual/android_usb/android0/f_%s
default
Usb_ep_ops
spi0@e401d000
Gadgetfs
MagneticsRJ45
dtb
usb_ep_ops
0 条评论
下一页