Compile the kernel:
But inside there is a wrong place:
CONFIG_KPL can not be canceled, the cancellation will cause dcm module can not be loaded, unable to control the led brightness.
Compile KPL need to add include directories:
CFLAGS_KERNEL =-march = armv7-a -I./drivers/txsr/Inc
Multi-point:
the i8320 kernel version and tinyx version does not support the now popular MT. There are several ways to solve this problem.
1) Upgrade the the kernel input section, upgrade tinyx. (A lot of work needs to be done)
2) to drive the dual mouse mode (current version supports the driver
compiled into a loadable module, in order to debug. Difficult, who has
the time to try)
3) change the drive, and direct access to the application. (30 minutes to get the method currently gba0.7 used)
Increase in sysfs inside a directory directtouchop, applications to directly read
static DEVICE_ATTR (directtouchop, S_IRUGO | S_IWUSR, direct_touch_show, direct_touch_store);
Directly read the driver source code:
For details, please point:
http://blog.csdn.net/mdjerry/archive/2010/10/20/5954595.aspx
Showing posts with label GENERAL. Show all posts
Showing posts with label GENERAL. Show all posts
Thursday, November 29, 2012
Camera header files, flash control source and flashlight ipk
A flashlight
program recently in order to put forward a flashlight, specially rebuilt
according to the API mmfcamcoder.h and some of the header files, along
with control of the source of the flash, and do a good job for you
greatly to continue to study
Fever too big ah flashlight Do not drive too long Oh, be careful, first off you put twists, burning JJ peril
Flashlight:
Header file:
Source:
Turn on the camera:
Turn off the camera:
Fever too big ah flashlight Do not drive too long Oh, be careful, first off you put twists, burning JJ peril
Flashlight:
Header file:
Source:
Turn on the camera:
- MMHandleType handler = 0, attr;
- MMCamPreset cp;
- cp.videodev_type = MM_VIDEO_DEVICE_CAMERA0; / / camera0 on behalf of the main camera
- int c = MMCamcorderCreate (& handler, & cp); / / Create a handler
- fprintf (stderr, "create [% d] \ n", c);
- / / Get the handler the strobe attributes enumeration, and assigned to the attr
- MMCamcorderGetAttrs (handler, MM_CAMCORDER_ATTR_STROBE, & attr);
- fprintf (stderr, "attr [% d] \ n", attr);
- int r = MMCamcorderRealize (handler); / / initialize handler
- fprintf (stderr, "Realize [% d] \ n", r);
- / / From attr obtain the strobe property control, and set FLASH_MOVIE_ON
- / / Set FLASH_OFF said Close, FLASH_ON and FLASH_AUTO are only flash, FLASH_MOVIE_ON long bright
- MMAttrsSetInt (attr, MM_CAMCORDER_STROBE_CONTROL, MM_CAMCORDER_FLASH_MOVIE_ON);
- / / Set a good strobe attribute set back to the handler
- MMCamcorderSetAttrs (handler, MM_CAMCORDER_ATTR_STROBE, attr);
- / / Start camera preview preview state handler
- int s = MMCamcorderStart (handler);
- fprintf (stderr, "start [% d] \ n", s);
- / / This is where the real start shooting, open to little reaction time, so if you just open the flash, do not need this step
- / / Int cs = MMCamcorderCaptureStart (handler);
- / / Fprintf (stderr, "CaptureStart [% d] \ n", cs);
- / / Close is turn you stop shooting
- / / Int css = MMCamcorderCaptureStop (handler);
- / / Fprintf (stderr, "CaptureStop [% d] \ n", css);
- / / Close the preview mode
- int ss = MMCamcorderStop (handler);
- fprintf (stderr, "Stop [% d] \ n", ss);
- / / Turn off the flash
- MMAttrsSetInt (attr, MM_CAMCORDER_STROBE_CONTROL, MM_CAMCORDER_FLASH_OFF);
- MMCamcorderSetAttrs (handler, MM_CAMCORDER_ATTR_STROBE, attr);
- / / Unrealize
- int ur = MMCamcorderUnrealize (handler);
- fprintf (stderr, "unrealize [% d] \ n", ur);
- / / Final destruction
- int d = MMCamcorderDestroy (handler);
- fprintf (stderr, "destroy [% d] \ n", d);
Subscribe to:
Posts (Atom)