00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00023 #include <unistd.h>
00024 #include <fcntl.h>
00025 #include <sys/ioctl.h>
00026 #include <stdio.h>
00027 #include <stdlib.h>
00028
00029 #define FBIO_IOCTL_BASE 'v'
00030 #define FBIO_ERASE_WHITE _IOW(FBIO_IOCTL_BASE, 2, struct display_update_info)
00031 #define WAVEFORM_4BPP_IMAGE 1
00032
00033 struct display_update_info
00034 {
00035 int waveform;
00036 int sequence;
00037 };
00038
00039
00040 int main(int argc, char *argv[])
00041 {
00042 int fbdev;
00043 int ret;
00044 struct display_update_info updateinfo;
00045
00046 fbdev = open ("/dev/fb0", O_RDWR);
00047
00048 if (fbdev == -1)
00049 {
00050 printf("Error opening framebufferdevice. # mknod /dev/fb0 c 29 0\n");
00051 exit(-1);
00052 }
00053
00054 updateinfo.waveform = WAVEFORM_4BPP_IMAGE;
00055 updateinfo.sequence = 0;
00056
00057 if ((ret=ioctl(fbdev, FBIO_ERASE_WHITE, &updateinfo)))
00058 {
00059 printf("Error sending FBIO_ERASE_WHITE: %x\n",ret);
00060 exit(-1);
00061 }
00062
00063 close(fbdev);
00064
00065 return 0;
00066 }