No older revisions available
No older revisions available
우리 보드 기준 (320x240x16bit)
~cpp #include <io.h> #include <fcntl.h> ... #include <linux/fb.h> #include <sys/mman.h> ... int main() { int fd; unsigned short *data; fb0 = open("/dev/fb0", O_RDWR); data = (unsigned short*)mmap(0, 320 * 240 * 2, PROT_READ | PROT_WRITE, MAP_SHARED, fb0, 0); data[x + y * 320] = RGB; // (x,y)에 RGB 찍기 munmap(data, 320 * 240 * 2); close(fb0); return 0; }