MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / readCMap

Function readCMap

source/kernel/devs/devfb.cpp:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64};
65
66void readCMap(KThread* thread, U32 address, struct fb_cmap* cmap) {
67 U32 i = thread->memory->readd(address);
68 U32 stop = thread->memory->readd(address+4)+i;
69 U32 red = thread->memory->readd(address+8);
70 U32 green = thread->memory->readd(address+12);
71 U32 blue = thread->memory->readd(address+16);
72
73 for (;i<stop;i++) {
74 thread->memory->writew(red, cmap->red[i]); red+=2;
75 thread->memory->writew(green, cmap->green[i]); green+=2;
76 thread->memory->writew(blue, cmap->blue[i]); blue+=2;
77 }
78}
79
80void writeFixInfo(KThread* thread, U32 address, struct fb_fix_screeninfo* info) {
81 thread->memory->memcpy(address, info->id, sizeof(info->id)); address+=16;

Callers 1

ioctlMethod · 0.85

Calls 2

readdMethod · 0.45
writewMethod · 0.45

Tested by

no test coverage detected