Android Driver Development Chapter 5-8 Reading notes

Source: Internet
Author: User

Android Drive Development Reading notes

Fifth Chapter

The s5pv210 is a 32-bit processor with low power consumption to provide high performance microprocessor solutions for mobile devices and general applications. It integrates the arm cortex-a8 core. Implements ARM architecture V7 and supports peripherals. His key features are "arm based on CPU subsystem with neon", 32/32kb i/d cache, 512kb L2 cache, 800hz operating frequency of 1.1v,1ghz to 1.2v.

Based on the S5PV210 processor, the control register, most pins are versatile, each pin requires defining a function that controls the function that defines each pin.

Data registers, if the PIN is configured as output, the output can be written to the pin in the corresponding bit in the data register, and if the PIN is configured as input, the data can be read from the bits corresponding to the data register.

Gpio Interface Application Example: through the Gpio Interface gpa0 (4)-gpa0 (7) control of the light emitting diode led1~led4 GPIO Interface Programming example, the control logic output low voltage corresponding LED lit.

Initialize GPIO:

Viod led_init (void) {

Iowrite32 (((Ioread32 (S5pv210_gpaocon) &0x000ffff) |0x1111<<16), S3c64xx_gpkcon);

Iowrite32 (((Ioread32 (S5pv210_gpaodat) |0xf0), S5pv210_gpaodat);

LED Driver Implementation:

Long gpio_led_ioctl (struct file *file,unsigned int cmd,unsigned long arg)

{if (_ioc_type (cmd)!=led_ioc-magic)

Return–einval;

if (_ioc-nr (cmd) >led_ioc-maxnr)

Return–einval;

Switch (CMD)//Identification Control command

{

Case Led_off:

Iowrite16 (Ioread16 (S5pv210_gpaodat |0x00f0), S5pv210_gpaodat);

break;

Case led-on:

Iowrite16 (Ioread16 (S5pv210_gpaodat |0x00f0), S5pv210_gpaodat);

break;

}

sixth Chapter Interface Driver Development

1led Interface Driver:

The DMA-210XP platform is configured with two LEDs, which are controlled by the Gpio interface Gpio3_0 and Gpio3_1, respectively.

LED driver circuit, LED is the light emitting diode. Is the common output device in the embedded system. A single LED is often used as a warning.

Drive structure:

Static struct File_operations led_fops =

{

Ower:this_module,

Read:led_read

Write:led_ioctl,

IOCTL;LED_IOCT,

Open:led_open,

Release:led_release,

};

Makefile File writing:

CC =//+ Cross compiler location

Kerneldia =//Kernel source location

Ifneq ($ (kernelrelease))

Obj-m: =led.0

PWD: =$ (shell pwd)

And then it's the test.

2 design analysis of backlight driver

In the Beiguang driver, to achieve the LCD backlight brightness adjustment. The main completion of 3 operations.

(1) Register the drive device and turn on the time Controller timer ()

(2) Drive PWM, complete the initial configuration of the PWM

seventh Android embedded configuration software

1 Interface Design

1) Create a Java project with the name DroidDraw

2) in the directory Org\droiddraw will have a main function as a population function, the next implementation of the system interface initialization, loading represents the image of the build. Add Monitoring for menu bar items.

Defining Windows and Loading window variables

Perform interface variable initialization operations

Loading interface Content Operations

3) interface Add content

The window is divided into the component information display area, the construction of the table structure area, the functional area, the auxiliary area, the auxiliary function area, the interface program canvas.

4) Android Embedded software: Menu bar Module component details display module, function selection module, auxiliary function module, programming area module

5) Interface design: Layout class, Button class, Text class, Time class, attributes

6) IO Design: This is an important part of the connection between the terminal and the underlying hardware device.

7) Database design: Configuration software database design includes table name, column name. Type, size, determines whether the primary key.

Self-Summary:

(1) Powerful interface display configuration function. Visual style interface, rich toolbar, operators can directly into the human development state, save time. Rich graphics control drawing and working Condition diagram Library, not only provide the required components, but also the interface Production Wizard. Provide users with rich drawing tools, rich animation connection, such as hidden, flashing, moving and so on, so that the interface vivid and intuitive. You can freely draw a variety of industrial interfaces, and can be arbitrarily edited, thereby freeing developers from the heavy interface design.
(2) Good openness. Refers to the configuration software can be connected with a variety of communication protocols, support a variety of hardware devices. Openness is an important index to measure the quality of a configuration software. The configuration software should be able to communicate with the low-level data acquisition equipment, can communicate with the management, and realize the two-way communication between the host computer and the lower computer.
(3) A variety of functional modules. Provide a rich library of control functions to meet the user's measurement and control requirements and on-site requirements. Using a variety of functional modules, the real-time monitoring of the production function report display history curve, real-time curve, prompt alarm and other functions, so that the system has a good human-machine interface, easy to operate, the system is not only suitable for single-machine centralized control, DCS distributed control, can also be a remote detection system with the ability to meet.
(4) a powerful database. With real-time database, can store a variety of data, such as analog, discrete, character type, and so on to achieve data exchange with external devices.
(5) Programmable command language. Have a programmable command language, so that users can according to their own needs of the program, the strong graphical interface
(6) Careful system security guard, different operators, give different operation right eye, ensure the safe and reliable operation of the whole system.
(7) Support offline and online simulation, quickly verify your design results, convenient design and commissioning, greatly reduce the burden of software developers in human-machine interface development and improve development efficiency, focus on professional product development, avoid repetitive labor. For you greatly shortened the product development cycle.

 

Eighth Chapter GPS with the Google Map Positioning System

The stuff on the manual didn't look too clear, and summed up some of them:

Global Positioning System (English: globalpositioning system, usually referred to as GPS), also known as the global satellite positioning system, is a mid-range circular orbit satellite navigation system. It provides accurate positioning, speed measurement and high-precision time standards for most parts of the Earth's surface (98%). Turn on location service: Getsystemservice () on. Code slightly

GPs in addition to navigation, positioning, measurement, due to the GPS system space satellite upload of the precise clock can be published time and frequency information, therefore, based on the precise clock on the space satellite, in the monitoring of ground monitoring station, the transmission of accurate time and frequency is another important application of GPs, This function can be used to control precise time or frequency, and can be used for many engineering experiments. In addition, according to foreign data, the use of GPs can also be used to obtain meteorological data for some experimental and engineering applications.

Android Driver Development Chapter 5-8 Reading notes

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.