
FDI
NXP LPC3180 Demo
User’s Manual
FDI
Rev 2
Page 34
9/7/2007
14.0
APPENDIX C: Framebuffer API
14.1
IOCTL Calls
Applications in the userspace may manipulate the LCD controller using certain IOCTL
commands provided by the framebuffer module. This section outlines these IOCTL calls,
lists expected arguments, and provides an example of its use.
1.
FBIO_DUMPSCREEN
a.
Purpose: Updates the screen with the latest data written to memory. The
4 arguments allow the user to update a localized portion of the screen or
the whole screen if desired.
b.
Arguments: Address of 4 element unsigned int array using the following
format: { x_Location, y_Location, x_Resolution, y_Resolution }
c.
Returns: 1 on failure, 0 on success
d.
Example:
unsigned int to_send[4]={0, 0, 128, 160};
if (ioctl(fbfd, FBIO_DUMPSCREEN, &to_send )) {
printf("Error dumping memory to LCD.\n");
exit(1);
}
2.
FBIO_TOGGLEONOFF
a.
Purpose: This command turns off the LCD Controller if it is on or turns it
on if the LCD Controller is off.
b.
Arguments: None
c.
Returns: 1 on failure, 0 on success
d.
Example:
if (ioctl(fbfd, FBIO_TOGGLEONOFF)) {
printf("Error toggling screen on/off.\n");
exit(1);
}
3.
FBIO_SCREENOFF
a.
Purpose: Turns off the screen if it is on. If the screen is already off, this
command has no effect.
b.
Arguments: None
c.
Returns: 1 on failure, 0 on success
d.
Example:
if (ioctl(fbfd, FBIO_SCREENOFF)) {
printf("Error turning screen off.\n");
exit(1);
}
Summary of Contents for LP3180
Page 39: ...FDI NXP LPC3180 Demo User s Manual FDI Rev 2 Page 39 9 7 2007...
Page 40: ......