sysfs.h 727B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include "light.h"
  3. // Implementation of the sysfs enumerator
  4. // Enumerates devices for backlights and leds
  5. // Device target data
  6. struct _impl_sysfs_data_t
  7. {
  8. char brightness[NAME_MAX];
  9. char max_brightness[NAME_MAX];
  10. };
  11. typedef struct _impl_sysfs_data_t impl_sysfs_data_t;
  12. bool impl_sysfs_init(light_device_enumerator_t *enumerator);
  13. bool impl_sysfs_free(light_device_enumerator_t *enumerator);
  14. bool impl_sysfs_set(light_device_target_t *target, uint64_t in_value);
  15. bool impl_sysfs_get(light_device_target_t *target, uint64_t *out_value);
  16. bool impl_sysfs_getmax(light_device_target_t *target, uint64_t *out_value);
  17. bool impl_sysfs_command(light_device_target_t *target, char const *command_string);