Changeset 30758 for titan/titan/global.h
- Timestamp:
- 10/30/14 19:29:22 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/global.h
r30757 r30758 253 253 } 254 254 #else 255 char* cmd = NULL; 256 cmd = ostrcat(cmd, "echo -e -n ", 1, 0); 257 cmd = ostrcat(cmd, "\"\\x0f\\x01", 0, 0); 255 unsigned char data[3]; 256 int hdmiFd = open("/dev/hdmi_cec", O_RDWR | O_NONBLOCK); 257 258 data[0] = 0x0f; 259 data[1] = 0x01; 260 258 261 if(flag == 0) 259 cmd = ostrcat(cmd, "\\x04\" > /dev/hdmi_cec", 0, 0);262 data[2] = 0x04; 260 263 else 261 cmd = ostrcat(cmd, "\\x36\" > /dev/hdmi_cec", 0, 0); 262 } 263 system(cmd); 264 free cmd; 264 data[2] = 0x36; 265 if(hdmiFd > 0) 266 { 267 write(hdmiFd, &data, 3); 268 close(hdmiFd) 269 } 265 270 #endif 266 271 } 267 268 269 270 echo -e -n "\x0f\x01\x04" > /dev/hdmi_cec271 272 272 return 0; 273 273 }
Note: See TracChangeset
for help on using the changeset viewer.