Intermec ck1 Reference Guide

Page of 390
Appendix A — 
µClinux System 
CK1 SDK Programmer’s Reference Manual 
303 
TCP/IP networking communication. There are also several socket types 
representing the type of service that supports the connection. The possible 
values include stream sockets that are supported by the TCP protocol of 
the Internet address family and a datagram socket supported by the UDP 
protocol.  
Device Drivers 
The device drivers fulfill the demands of the kernel calls that the different 
applications do through system calls. The device drivers provide an actual 
interface to the physical hardware and provide an ability to present a 
uniform interface to applications. Writing device drivers is basically the 
same kind of a task as writing a regular application. The device driver 
should be able to map the different user needs to the underlying hardware. 
As Linux provides the whole kernel code freely available, the device driver 
designer should look and reuse the already existing code, as it provides 
convenient solutions for different problems. As the device driver functions 
at the kernel level, a certain issue should be taken under concern. The 
device driver code should never have busy wait loops. If the device driver is 
designed to run a loop in a kernel mode, the kernel appears to hang the 
whole system. Also the driver should only implement a mapping from the 
applications to the physical device. The issue of how to use the hardware is 
up to the application. The driver should also be reentrant, as many 
different user applications may use the device simultaneously.  
Linux supports three types of peripheral drivers: character, block, and 
network device drivers. Although other classes of driver exist in Linux, 
these are the biggest ones. A block device driver is accessed by the user 
application through a system buffer. These drivers serve the data to an end 
physical device in a form of fixed size blocks typically 512 or 1024 bytes, 
which buffer the data before it is written to the device. This functionality 
allows random access to a device. The other way is a direct access to a 
device. In character drivers, devices read and write directly without any 
buffering. These drivers usually provide read, write, open, and close system 
calls that allow the device to be invoked. The third type is a network 
interface that provides any transaction made toward the network. These 
devices are able to exchange the files with another host locally or over the 
network. This physical or software interface is responsible of sending and 
receiving data packets.   
µClinux  
The 
µClinux or micro-controller Linux is the popular variant of 
mainstream Linux, specially designed for deeply embedded 
microprocessors without the memory management unit. The MMU-less is 
a quite common factor for low-cost microprocessors, where component 
prices are crucial.  
This part of the work explains the general scope of 
µClinux.