Use GPANEL_CLEAR ioctl to switch the display orientation.

Enable gpio driver for Picadillo board.
This commit is contained in:
Serge Vakulenko
2015-10-08 14:01:49 -07:00
parent f7d93551cb
commit b99fcc6c8c
6 changed files with 73 additions and 28 deletions

View File

@@ -24,7 +24,16 @@
#include <sys/ioctl.h>
#include <sys/gpanel.h>
void gpanel_clear(int color)
void gpanel_clear(int color, int *xsize, int *ysize)
{
ioctl(_gpanel_fd, GPANEL_CLEAR, color);
struct gpanel_clear_t param;
param.color = color;
param.xsize = xsize ? *xsize : 0;
param.ysize = ysize ? *ysize : 0;
ioctl(_gpanel_fd, GPANEL_CLEAR, &param);
if (xsize)
*xsize = param.xsize;
if (ysize)
*ysize = param.ysize;
}