更新风扇和背光共用GPIO
private void updateFansState(String cmd) {
Log.i(TAG, "-------------cmd=" + cmd + "------------------");
File f = new File("/sys/class/gpio/gpio113/direction");
if (!f.exists()) {
return;
}
OutputStream output = null;
OutputStreamWriter outputWrite = null;
PrintWriter print = null;
StringBuffer strbuf = new StringBuffer("");
strbuf.append(cmd);
try {
output = new FileOutputStream(f);
outputWrite = new OutputStreamWriter(output);
print = new PrintWriter(outputWrite);
print.print(strbuf.toString());
print.flush();<