C++ code using sysfs