Home | History | Annotate | Download | only in 1.0
      1 component_class: HAL_CONVENTIONAL
      2 component_type: LIGHT
      3 component_type_version: 1.0
      4 
      5 original_data_structure_name: "struct light_device_t"
      6 
      7 header: "<hardware/hardware.h>"
      8 header: "<hardware/lights.h>"
      9 
     10 interface: {
     11   api: {
     12     name: "set_light"
     13     return_type: {
     14       type: TYPE_SCALAR
     15       scalar_type: "int32_t"
     16     }
     17     arg: {
     18       type: TYPE_PREDEFINED
     19       scalar_type: "pointer"
     20       predefined_type: "struct light_device_t*"
     21     }
     22     arg: {
     23       type: TYPE_PREDEFINED
     24       scalar_type: "pointer"
     25       predefined_type: "struct light_state_t*"
     26     }
     27   }
     28 
     29   attribute: {
     30     name: "light_state_t"
     31     type: TYPE_STRUCT
     32 
     33     struct_value: {
     34       name: "color"
     35       type: TYPE_SCALAR
     36       scalar_type: "uint32_t"
     37       scalar_value: {
     38         uint32_t: 0xffffff00
     39       }
     40     }
     41 
     42     struct_value: {
     43       name: "flashMode"
     44       type: TYPE_SCALAR
     45       scalar_type: "int32_t"
     46       scalar_value: {
     47         int32_t: 0
     48       }
     49     }
     50 
     51     struct_value: {
     52       name: "flashOnMs"
     53       type: TYPE_SCALAR
     54       scalar_type: "int32_t"
     55       scalar_value: {
     56         int32_t: 0
     57       }
     58     }
     59 
     60     struct_value: {
     61       name: "flashOffMs"
     62       type: TYPE_SCALAR
     63       scalar_type: "int32_t"
     64       scalar_value: {
     65         int32_t: 0
     66       }
     67     }
     68 
     69     struct_value: {
     70       name: "brightnessMode"
     71       type: TYPE_SCALAR
     72       scalar_type: "int32_t"
     73       scalar_value: {
     74         int32_t: 0
     75       }
     76     }
     77   }
     78 
     79   attribute: {
     80     type: TYPE_ENUM
     81 
     82     enum_value: {
     83       scalar_type: "int32_t"
     84 
     85       enumerator: "LIGHT_FLASH_NONE"
     86       scalar_value: {
     87         int32_t: 0
     88       }
     89 
     90       enumerator: "LIGHT_FLASH_TIMED"
     91       scalar_value: {
     92         int32_t: 1
     93       }
     94 
     95       enumerator: "LIGHT_FLASH_HARDWARE"
     96       scalar_value: {
     97         int32_t: 2
     98       }
     99     }
    100   }
    101 
    102   attribute: {
    103     type: TYPE_ENUM
    104 
    105     enum_value: {
    106       scalar_type: "int32_t"
    107 
    108       enumerator: "BRIGHTNESS_MODE_USER"
    109       scalar_value: {
    110         int32_t: 0
    111       }
    112 
    113       enumerator: "BRIGHTNESS_MODE_SENSOR"
    114       scalar_value: {
    115         int32_t: 1
    116       }
    117     }
    118   }
    119 
    120   attribute: {
    121     name: "LIGHT_ID_BACKLIGHT"
    122     type: TYPE_STRING
    123     string_value: {
    124       message: "backlight"
    125     }
    126     is_const: true
    127   }
    128 
    129   attribute: {
    130     name: "LIGHT_ID_KEYBOARD"
    131     type: TYPE_STRING
    132     string_value: {
    133       message: "keyboard"
    134     }
    135     is_const: true
    136   }
    137 
    138   attribute: {
    139     name: "LIGHT_ID_BUTTONS"
    140     type: TYPE_STRING
    141     string_value: {
    142       message: "buttons"
    143     }
    144     is_const: true
    145   }
    146 
    147   attribute: {
    148     name: "LIGHT_ID_BATTERY"
    149     type: TYPE_STRING
    150     string_value: {
    151       message: "battery"
    152     }
    153     is_const: true
    154   }
    155 
    156   attribute: {
    157     name: "LIGHT_ID_NOTIFICATIONS"
    158     type: TYPE_STRING
    159     string_value: {
    160       message: "notifications"
    161     }
    162     is_const: true
    163   }
    164 
    165   attribute: {
    166     name: "LIGHT_ID_ATTENTION"
    167     type: TYPE_STRING
    168     string_value: {
    169       message: "attention"
    170     }
    171     is_const: true
    172   }
    173 
    174   attribute: {
    175     name: "LIGHT_ID_BLUETOOTH"
    176     type: TYPE_STRING
    177     string_value: {
    178       message: "bluetooth"
    179     }
    180     is_const: true
    181   }
    182 
    183   attribute: {
    184     name: "LIGHT_ID_WIFI"
    185     type: TYPE_STRING
    186     string_value: {
    187       message: "wifi"
    188     }
    189     is_const: true
    190   }
    191 }
    192