22 #include "../wlcore/wlcore.h"
23 #include "../wlcore/io.h"
35 if ((addr % 4) == 0) {
36 ret = wlcore_read32(wl, addr, &tmp);
40 tmp = (tmp & 0xffff0000) | val;
41 ret = wlcore_write32(wl, addr, tmp);
43 ret = wlcore_read32(wl, addr - 2, &tmp);
47 tmp = (tmp & 0xffff) | (val << 16);
48 ret = wlcore_write32(wl, addr - 2, tmp);
63 if ((addr % 4) == 0) {
65 ret = wlcore_read32(wl, addr, &val);
69 ret = wlcore_read32(wl, addr - 2, &val);
71 *out = (val & 0xffff0000) >> 16;