#include <stdio.h>
int main(void) {
unsigned short set_value, dev=3, page=0, reg=2;
set_value = 0x1000 | 0x0400 | dev << 5 | 0x16 ;
printf("0x%04x\n", set_value
); set_value |= 0x8000;
printf("0x%04x\n", set_value
);
set_value = 0x1000 | 0x0400 | dev << 5 | reg ;
printf("0x%04x\n", set_value
); set_value |= 0x8000;
printf("0x%04x\n", set_value
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7Cgl1bnNpZ25lZCBzaG9ydCBzZXRfdmFsdWUsIGRldj0zLCBwYWdlPTAsIHJlZz0yOwoJc2V0X3ZhbHVlID0gMHgxMDAwIHwgMHgwNDAwIHwgZGV2IDw8IDUgfCAweDE2IDsKCXByaW50ZigiMHglMDR4XG4iLCBzZXRfdmFsdWUpOwoJc2V0X3ZhbHVlIHw9IDB4ODAwMDsKCXByaW50ZigiMHglMDR4XG4iLCBzZXRfdmFsdWUpOwoKCXNldF92YWx1ZSA9IDB4MTAwMCB8IDB4MDQwMCB8IGRldiA8PCA1IHwgcmVnIDsKCXByaW50ZigiMHglMDR4XG4iLCBzZXRfdmFsdWUpOwoJc2V0X3ZhbHVlIHw9IDB4ODAwMDsKCXByaW50ZigiMHglMDR4XG4iLCBzZXRfdmFsdWUpOwoKCXJldHVybiAwOwp9Cg==