| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 115 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 115 Page - STMicroelectronics |
|
115 / 245 page ![]() UM0851 Communication device drivers Doc ID 16604 Rev 2 115/245 Figure 30. Data structure layers ● port_t: physical interface abstraction, SPEAr HDLC driver specified structure. It keeps track of all the HDLC channels running on this interface. TDM/E1 interfaces may have multiple HDLC channels. RS485 interface only has one HDLC channel. ● channel_t: logical HDLC channel abstraction, SPEAr HDLC driver specified structure. Derived from hdlc_device structure. It contains a pointer to the physical interfaces it belongs to. ● hdlc_device: common HDLC device defined in the generic HDLC layer, derived from net_device ● net_device: common network device defined in the Linux network layer. 4.10.3 SPEAr HDLC driver interface The SPEAr HDLC driver uses common network device interfaces. The generic HDLC layer provides common routines to interact with the Linux network layer. The SPEAr HDLC driver calls the generic HDLC layer to register itself and handle any common requests. Init HDLC channels When the driver module is loaded, spr_hdlc_add_port() is called for each physical port to be initialized and registers the corresponding HDLC channels. For TDM/E1 port, multiple HDLC channel is registered. The number of HDLC channels is defined in configuration CONFIG_SPEAR_TDM_HDLC_CHANNEL_NUM. For each RS485 port, one HDLC channel is registered. For every HDLC channel, one SPEAr HDLC private structure channel_t is created. The driver also creates a common HDLC device structure by calling alloc_hdlcdev in Linux generic HDLC layer. Then, it associates it with the channel_t structure. The prototype of alloc_hdlcdev is: struct net_device *alloc_hdlcdev(void *priv); /* Driver passes the SPEAR HDLC priavte structure channel_t to the priv argument It returns a standard net_device structure pointer. The access to hdlcdev structure is done via macros struct hdlc_dev *hdev = dev_to_hdlc(dev); The access to the SPEAR HDLC private structure is done via casting the priv member of hdlc_dev struct channel_t *ch = dev_to_hdlc(dev)->priv; */ net_device port_t SPEAr HDLC Driver hdlc_device channel_t Network Layer Generic HDLC Layer |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |