Dimmable Light Exported Macros

group Dimmable_Light_Exported_Macros

Functions

void light_driver_init(void)

initialize light driver common part

void light_pin_config(const light_t *light)

config light pin

参数:

light[in] light handle

void light_pin_dlps_config(const light_t *light)

config light dlps

参数:

light[in] light handle

void light_lighten(light_t *light, uint16_t lightness)

set light lightness

备注

update lightness file only

参数:
  • light[in] light handle

  • lightness[in] light lightness

void light_set_lightness(light_t *light, uint16_t lightness)

set light lightness

备注

update lightness and lightness_last field

参数:
  • light[in] light handle

  • lightness[in] light lightness

blink light

备注

frequency = hz_numerator / hz_denominator Hz, range: 1/13 ~ 2.5K

参数:
  • light[in] light handle

  • hz_numerator[in] hz numerator

  • hz_denominator[in] hz denominator

  • duty[in] high duty

bool light_flash_write(light_flash_param_type_t type, uint16_t len, void *pdata)

write light parameter to flash

参数:
  • type[in] parameter type

  • len[in] parameter length

  • pdata[in] input parameter data

返回值:
  • TRUE – store success

  • FALSE – store failed

bool light_flash_read(light_flash_param_type_t type, uint16_t len, void *pdata)

read light parameter from flash

参数:
  • type[in] parameter type

  • len[in] parameter length

  • pdata[out] output parameter data

返回值:
  • TRUE – restore success

  • FALSE – restore failed

bool light_power_on_count_check(uint8_t count)

check light power on count

参数:

count[in] power on count