Editor: Because the LINUX kernel already supports the host driver of S3C2440 and supports a wide range of peripherals, this part can be used just by configuring. Because there are many things to configure, no detailed screenshots are given. It is very clear to read the manual. If you need the manual, please leave your email address to request it.
1 Configure and test the USB keyboard, scanner and mouse
In the terminal of the kernel source code directory, enter: make menuconfig, and select the following submenu items in sequence:
Device Drivers --->
[*] HID Devices --->
Press the space bar to select "USB Human Interface Device (full HID) support", so that the USB keyboard and mouse items are configured.
Tip: The kernel source code directory corresponding to the configuration options here is: linux-2.6.32.2/drivers/hid/usbhid, where the principles of the USB keyboard and barcode scanner are the same, so their codes are the same.
2 Test USB keyboard, scanner and mouse
Execute make zImage in the root directory of kernel source code to burn the generated new kernel into the development board. We still use the file system root_qtopia provided by Friendly Arm for testing, because it can support USB keyboard, mouse and touch screen at the same time, and supports hot plugging, so it is very convenient to use. In the previous steps, we have entered the qtopia graphics system by clicking on the touch screen, so here we can just find a USB HUB, connect a USB mouse and keyboard, or even a USB barcode scanner. Use the mouse to find an application, such as the "Notes" that comes with qtopia, click to open it, then you can use the keyboard to input various English characters, and you can also use the USB barcode scanner to directly scan the barcode for input.
3 Configure the USB flash drive
Because the USB flash drive uses SCSI commands, we first add SCSI support. In the Device Drivers menu, select SCSI devicesupport, press Enter to enter the menu that appears, press the spacebar to select option--SCSI device support, then enter and select SCSI disk support, return to the Device Drivers menu, select USB support, press Enter to enter the USB support menu, find and select "<*> USB Mass Storage support". In addition, most of the current USB flash drives and other mobile storage devices use FAT/FAT32 format, so we also need to add support for the FAT32 file system. In the kernel configuration main menu, select the following menu items in sequence:
File systems --->
DOS/FAT/NT Filesystems --->
Enter the FAT32 file system configuration submenu and select: MSDOS fs support
In addition, in order to support Chinese and English encodings, select "-*- Native languagesupport --->" under the "File systems" menu and enter. Here, we need to select support for the following encodings:
<*> Codepage 437 (United States, Canada)
<*> NLS ISO 8859-1 (Latin 1; Western European Languages)
<*> NLS UTF-8
Exit and save the above configuration.
4 Test USB drive
Follow the above steps, execute: make zImage in the kernel source code root directory, burn the generated new kernel into the development board, do not insert the USB drive yet (do this to see the printed information when inserting), wait for the system to start, enter the command line console, at this time, you can see the USB drive information: At this time, the USB drive has been automatically mounted to the /udisk directory of the development board. At the same time, in the Qtopia system, you can see an icon on the taskbar, and all the files in the USB drive will be displayed in the "Documents" group, but it does not display the directory name. If you have too many files, then the list is also quite impressive.
Note: Supporting automatic mounting of USB drives in Qtopia is implemented through a Qtopia 2.2.0 plug-in developed by Friendly Arm. At present, it only recognizes the first partition of MMC/SD card or USB drive, and the format is the common VFAT/FAT32/FAT16. If your USB drive or SD card cannot be recognized, please check whether it is in VFAT/FAT32/FAT16 format.
5 Configuring and testing USB cameras
The Linux kernel version is frequently updated, and one of the main reasons is that more driver support is added. Directory Linux-2.6.32.
2 Almost all USB camera drivers are supported, but the interfaces provided by each manufacturer's USB camera driver to the upper layer are different. Therefore, even if the kernel supports so many cameras, ordinary USB camera applications cannot recognize them. The following are the steps to configure USB cameras in the kernel: In the Device Drivers menu, select Multimedia devices, press Enter to enter, select the "*" option, and select Video capture adapters to
enter A menu will appear, find the V4L USB device option and enter the menu as shown in the figure, select the "*" option as shown in the figure, and then select GSPCA based webcams to enter. GSPCA is a universal USB camera driver developed by a French programmer in his spare time. You can choose to support all types of USB cameras here.
--- GSPCA based webcams
<*> ALi USB m5602 Camera Driver
<*> STV06XX USB Camera Driver
<*> GL860 USB Camera Driver
<*> Conexant Camera Driver
<*> Etoms USB Camera Driver
<*> Fujifilm FinePix USB V4L2 driver
<*> Jeilin JPEG USB V4L2 driver
<*> Mars USB Camera Driver
<*> Mars-Semi MR97310A USB Camera Driver
<*> OV519 USB Camera Driver
<*> OV534 USB Camera Driver
<*> Pixart PAC207 USB Camera Driver
<*> Pixart PAC7311 USB Camera Driver
<*> SN9C20X USB Camera Driver
<*> SONIX Bayer USB Camera Driver
<*> SONIX JPEG USB Camera Driver
<*> SPCA500 USB Camera Driver
<*> SPCA501 USB Camera Driver
<*> SPCA505 USB Camera Driver
<*
> SPCA506 USB Camera Driver <
*> SPCA508 USB Camera Driver <*> SPCA561 USB Camera Driver
<*> SQ Technologies SQ905 based USB Camera Driver
<* > SQ Technologies SQ905C based USB Camera Driver
<*> Syntek DV4000 (STK014) USB Camera Driver
<*> SUNPLUS USB Camera Driver
<*> T613 (JPEG Compliance) USB Camera Driver
<*> TV8532 USB Camera Driver
<*> VC032X USB Camera Driver
<*> ZC3XX USB Camera Driver
In this way, we have configured the universal USB camera driver. If there is a new kernel version, there may be many more options.
6 Test the USB camera
Continue with the above steps and execute make zImage in the kernel source code directory. Burn the generated kernel into the development board, and still use the file system root_qtopia that comes with Friendly Arm, because it already has a USB camera dynamic preview and photo taking program. Plug the camera into the USB Host port of the development board, and then In the "Friendly Arm" program group, click to open the "USB Camera" program, you will see a dynamic preview interface, adjust the focus of the camera, take a good pose, and click the "Snap" button to take a photo. The photo will be saved in the "Documents" group. The program can also adjust the brightness, contrast and gamma value; each camera model has been set to the best value or default value at the factory, which will be read when the program is opened. They are set accordingly.
Previous article:Embedded Learning Notes: Light up an LED
Next article:Linux-2.6.32 transplanted SD card driver on mini2440 development board
Recommended ReadingLatest update time:2024-11-23 04:58
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- DCDC isolated voltage regulated power supply module supports electric vehicle transmission and conversion, and configures high power supply system!
- Programmable linear constant current source circuit leakage current type: based on PAC chip GP8102, GP8202
- [Repost] Popular Science of Components: NAND Flash Memory
- 1.2 PB Raspberry Pi Disk Array
- Resistive tap monitors and sets W-CDMA power levels
- TI's GaN high-efficiency 1MHz CrM totem-pole PFC converter reference design
- Popular Science | Power Management Knowledge
- Today's Live Broadcast | ROHM's DC/DC Converter Design Seminar, with an experienced power supply expert
- TI Reference Voltage (VREF) Application Design Tips
- How to cancel the DreamNet WAP service