Start some blinking/breathing effects
Stop the effect in progress and keep the current lighting output
Initialize sm2235egh/sm2335egh output
Register the sm2135eh channel
Deinitialize sm2235egh/sm2335egh and release resources
Enable/Disable the lightbulb fade function
Stop the effect in progress and restore the previous lighting output
The handler for the underlying events. If necessary this handler dispatch the user events to applications.
Convert RGB model to HSV model
Set output with hardware fade
Deinitialize pwm and release resources
Enable/Disable sleep status
Initialize sm2135e output
Register the sm2135e channel
Deinitialize sm2135e and release resources
Initialize sm2135e output
Register the sm2135eh channel
Deinitialize sm2135eh and release resources
Initialize sm2135e output
Register the bp5758d channel
Deinitialize bp5758d and release resources
Initialize bp1658cj output
Register the bp1658cj channel
Deinitialize bp1658cj and release resources
Deinitialize ws2812 and release resources
Initialize kp18058 output
Register the kp18058 channel
Deinitialize kp18058 and release resources
Deinitialize the lightbulb and release resources
Convert HSV model to RGB model
Convert xyY model to RGB model
Store lightbulb state to nvs.
Get a semaphore's count. This routine returns the current count of @a sem.
Set color temperature (CCT)
Set only rgb channel output
Set only cct/brightness or cold/warm channel output
Set only rgb channel output
Set only wy channel output
Set only rgb channel output
Set only wy channel output
Set only rgb channel output
Set only cw channel output
Set only rgb channel output
Set only cw channel output
Set only rgb channel output
Set only cw channel output
Set only rgb channel output
Set only cw channel output
Enable/Disable the lightbulb storage function
Re-update the lightbulb status variable
Get lightbulb fade function enabled status
Convert RGB model to xyY model
Convert CCT kelvin to percentage
Convert percentage to kelvin
Set xyY @attention The xyY color model cannot fully correspond to the HSV color model, so the color may be biased. The grayscale will be recalculated in lightbulb, so we cannot directly operate the underlying driver through the xyY interface.
Get lightbulb status from nvs
Erase lightbulb state stored in nvs.
Used to test lightbulb hardware functionality
Give a semaphore. This routine gives @a sem, unless the semaphore is already at its maximum permitted count.
Take a semaphore. This routine takes @a sem.
Initialize a timer. This routine initializes a timer, prior to its first use.
fade processing logic fade_data[channel].num -> Fade cycle, This value is related to CHANGE_RATE_MS and fade_ms time fade_data[channel].step -> Fade step, < 0 indicates decrement, otherwise increment. The actual meaning is delta. fade_data[channel].cycle -> This value is used for the actions. fade_data[channel].cur -> Current value fade_data[channel].final -> Final value fade_data[channel].min -> Minimum value Final, min, cur are used to define a set of ranges, which will allow grayscale changes in arbitrary ranges, not from 0% to 100%.
check if the list is empty
Append a node to the given list This and other sys_slist_*() functions are not thread safe.
Convert Kelvin to CCT percentage input output 2200k 0 4600k 50 7200k 100
Find and remove a node from a list This and other sys_slist_*() functions are not thread safe.
get a reference to the head item in the list
get a reference to the next item in the list
@def genie_model_analyze analyze the received message and notify genie SDK
Convert CCT percentage to Kelvin input output 0 2200k 50 4600k 100 7200k
Convert CCT and brightness to cold and warm @attention White power was recalculated at the same time. input output(white_max_power = 100) output(white_max_power = 200) 0,100 0,255 0,255 50,100 127,127 255,255 100,100 255,0 255,0 0,0 0,0 0,0 0,50 0,127 0,127 0,100 0,255 0,255 50,0 0,0 0,0 50,50 63,63 127,127 50,100 127,127 255,255 100,0 0,0 0,0 100,50 127,0 127,0 100,100 255,0 255,0
add node to tail of list This and other sys_dlist_*() functions are not thread safe.
remove a specific node from a list The list is implicit from the node. The node must be part of a list. This and other sys_dlist_*() functions are not thread safe.
Peek the first node from the list
Peek the next node from current node
@def genie_model_msg_send send the vendor model message
start poweron indicate timer.
Initializing Genie Mesh components.
Store reboot count in flash.
@def genie_model_msg_check_tid check received vendor message's tid
Initialize the function that resets whole system by multiple reboot in GENIE_RESET_BY_REPEAT_TIMEOUT.
Initialize a semaphore. This routine initializes a semaphore object, prior to its first use.
Start the timer to handle the program reset operation. Avoid reset indication messages not reaching Genie Speaker.
Clean the recored count for reboot.
check wether a timer is started or not.
Start timer specified by index.
Start periodic timer specified by index.
Dispatch message according opcode.
check whether there is this tid in record, and record it if not.
handle the vendor message
Genie vendor model indicate self status.
GENIE_RESET_BY_REPEAT_TIMEOUT
@def genie_model_retry_timer_cb timeout handler for the g_vnd_msg_timer
@def genie_model_msg_node_free free the vendor model message node struct's memory
To resolve some compilation warning issues
Recalculate white power @attention Please refer to `cct_and_brightness_convert_to_cold_and_warm`
Recalculate value input output 100 100 80 82 50 55 11 19 1 10 0 0
Recalculate brightness input output 100 100 80 82 50 55 11 19 1 10 0 0
Recalculate color power @attention 300% = 100% + 100% + 100% : Full power output on each channel. If single channel output is 3w then total output is 9w.
Fetch and remove the first node of the given list List must be known to be non-empty. This and other sys_slist_*() functions are not thread safe.
Fetch and remove the first node of the given list This and other sys_slist_*() functions are not thread safe.
Remove a node This and other sys_slist_*() functions are not thread safe.
get a reference to the next item in the list, node is not NULL Faster than genie_dlist_peek_next() if node is known not to be NULL.
add node to head of list This and other sys_dlist_*() functions are not thread safe.
insert node before a node Insert a node before a specified node in a list. This and other sys_dlist_*() functions are not thread safe.
Test if the given list is empty
Peek the next node from current node, node is not NULL Faster then genie_slist_peek_next() if node is known not to be NULL.
Prepend a node to the given list This and other sys_slist_*() functions are not thread safe.
Append a list to the given list Append a singly-linked, NULL-terminated list consisting of nodes containing the pointer to the next node as the first element of a node, to @a list. This and other sys_slist_*() functions are not thread safe.
Delete a semaphore. This routine delete @a sem,
Get a semaphore's count. This routine returns the current count of @a sem.
Initializing element state.
Handle hardware reset, and indicate hardware reset.
Genie Mesh Component Init, 1. Handle Mesh Init according esp-ble-mesh init status 2. Start power indeicate if ble-mesh already provisioned 3. Start PB-ADV Timer if ble-mesh not provisioned 4. Hardware reset ble-mesh provision information if reset flag be configed.
After the Bluetooth Mesh device is powered on, if it is in the unprovisioned state, it needs to broadcast the Unprovisioned Device Beacon, and the broadcast duration is 10 minutes by default
If the network is still not configured after the timeout, the device enters the silent broadcast state and closes the PB_GATT broadcast.
Execute color change action.
Reset timer callback timeout, Send event to genie event to handle reset action.
Read reboot count from flash.
@def genie_model_msg_list_append duplicate genie_model_msg_t and append it to vendor model message list to be monitored
@def genie_model_msg_node_generate duplicate genie_model_msg_t and save to genie_model_msg_node_t
@def genie_model_set_ack handle GENIE_OP_ATTR_SET_ACK message
@def genie_model_set_unack handle GENIE_OP_ATTR_SET_UNACK message
@def genie_model_confirm handle GENIE_OP_ATTR_CONFIME message
@def genie_model_confirm_tg handle GENIE_OP_ATTR_CONFIME_TG message
@def genie_model_transparent handle GENIE_OP_ATTR_TRANS_MSG message
@def genie_model_transparent_ack handle GENIE_OP_ATTR_TRANS_ACK message
@def genie_model_get_status handle GENIE_OP_ATTR_GET_STATUS message
@def genie_model_init vendor model server related global parameter initialization
Get Genie Vendor Model Appkey ID
Get Genie Vendor Model Netkey ID
@def genie_model_msg_gen_tid generate tid used in vendor model message
merge two slists, appending the second one to the first When the operation is completed, the appending list is empty. This and other sys_slist_*() functions are not thread safe.
Insert a node to the given list This and other sys_slist_*() functions are not thread safe.
check if a node is the list's head
check if a node is the list's tail
check if more than one node present This and other sys_dlist_*() functions are not thread safe.
get a reference to the head item in the list The list must be known to be non-empty.
get a reference to the tail item in the list
insert node after a node Insert a node after a specified node in a list. This and other sys_dlist_*() functions are not thread safe.
insert node at position Insert a node in a location depending on a external condition. The cond() function checks if the node is to be inserted _before_ the current node against which it is checked. This and other sys_dlist_*() functions are not thread safe.
get the first node in a list This and other sys_dlist_*() functions are not thread safe.
Peek the last node from the list
get the remain bytes of message
stop the delay_timer and trans_timer for element.
calculater current state.