Android Deep explore HAL and Driver Development-—— Sixth chapter

Source: Internet
Author: User

The sixth chapter mainly introduces the Java programming Interface program under the Android environment. Includes LED interface, serial port, ZigBee and driver, Wi-Fi interface, player and so on.
(1) LED driver circuit: GPIO interface, Port group GPJ3 contains six control registers: control register, pull-up register, data register. The function of the LED character device is open, release, read, write, ioctl. The make is compiled in the test to get the Led.ko file loaded with the insmod instruction.
LED interface design: New project, add picture resources, compile main. XML file for UI design, import code, add Jnljava programs, add so library files, build apk. LED program test: Start the system, add the driver to the system, install the APK, and open the installed LEDs. Backlight-driven Design: registers the drive device and turns on the time controller, drives the PWM, and adjusts the backlight with the application-driven connection.
Special registers for keyboard interface are: Port control register, data register, pull, drive strength. Operation of UART serial interface: Data sending, receiving. The s5pv210 has four UART baud rate divisor buffers. The DMA-210XP has two serial ports: UART0 and UART3. The UART's dedicated registers are: line control, UART control, receive, and transmit status registers. The Linux serial interface also uses open, close, read, write, IOCTL, and so on.
ZigBee is a short-distance, high-reliability wireless communication technology. ZigBee interface design: UI upper Layer design, edit program code, Main.java file, serial port data interaction Receivethread.java file, add JNI function and so function library, build apk. Wi-Fi Interface: short-range wireless transmission technology to receive radio signals within hundred meters. His programming: New engineering Projects, writing String.xml, building color.xml files, writing main.xml files, writing wi-fiactivity. 3G interface programming methods similar to the above are compiled Values.xml and write Detailactivity class. MediaPlayer player: contains audio and video.

Android Deep explore HAL and Driver Development-—— Sixth chapter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.