Symbols
loading...
Files
loading...

rpr_server sample sample

rpr_server sample is a sample project defining the following symbols:

Most used functions

Name
Location
Summary
Start some blinking/breathing effects
Stop the effect in progress and keep the current lighting output
Stop all channel output
Stop all channel output
Initialize sm2235egh/sm2335egh output
Register the sm2135eh channel
Deinitialize sm2235egh/sm2335egh and release resources
Stop all channel output
Enable/Disable the lightbulb fade function
Stop the effect in progress and restore the previous lighting output
Convert RGB model to HSV model
Initialize pwm output
Register the pwm channel
Set any channel output
Stop all channel output
Set output with hardware fade
Deinitialize pwm and release resources
Enable/Disable sleep status
Initialize sm2135e output
Register the sm2135e channel
Set any channel output
Deinitialize sm2135e and release resources
Initialize sm2135e output
Register the sm2135eh channel
Deinitialize sm2135eh and release resources
Initialize sm2135e output
Set any channel output
Register the bp5758d channel
Deinitialize bp5758d and release resources
Initialize bp1658cj output
Register the bp1658cj channel
Deinitialize bp1658cj and release resources
Initialize ws2812 output
Deinitialize ws2812 and release resources
Initialize kp18058 output
Set any channel 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.
Initialize the lightbulb
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 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
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.
Erase lightbulb state stored in nvs.
Used to test lightbulb hardware functionality
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%.
Convert Kelvin to CCT percentage input output 2200k 0 4600k 50 7200k 100
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
To resolve some compilation warning issues
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.
Recalculate white power @attention Please refer to `cct_and_brightness_convert_to_cold_and_warm`

Other commonly used symbols

Name
Location
Summary
KP18058 register start address - Byte0
The working status of the lightbulb. @attention Both the variable `value` and the variable `brightness` are used to mark light brightness. They respectively indicate the brightness of color light and white light.
BP5758D register current address - Byte2-6 BP5758D register grayscale address - Byte7-16
Resource Access Control
Effect function configuration options
Output configuration
Output configuration
Output configuration
Output configuration
Output configuration
Output configuration
Output configuration
These configurations are used for color calibration.
sm2135e register grayscale address - Byte3-7
SM2135EH register grayscale address - Byte3-7
SM2x35EGH register current address - Byte1 SM2x35EGH register grayscale address - Byte2-7
BP1658CJ register current address - Byte1 BP1658CJ register grayscale address - Byte 2-11
Lightbulb Configuration Options @attention If the `gamma_conf` `external_limit` variable is not set, will use the default value.
0% -> .. -> 100% 2200K -> .. -> 7000K warm -> .. -> cold
Output limit or gain without changing color
Used to map percentages to kelvin
Some Lightbulb Capability Configuration Options
Use an external custom gamma table.
Function pointers to monitor the workings of the underlying hardware
Map color channels to IDs | Rule 1 | Rule 2 | Rule 3 | | | | RED | RED | RED | GREEN | GREEN | GREEN | BLUE | BLUE | BLUE | COLD | CCT | WHITE | WARM | BRIGHTNESS | YELLOW
Lightbulb fade time calculate
sm2135e register current address - Byte1 sm2135e register mode address - Byte2
SM2135EH register current address - Byte1 SM2135EH register standby mode address - Byte2
Function pointers to store lightbulb status
some default configuration
BP5758D register out control address - Byte1
KP18058 register baseline voltage compensation address - Byte1
KP18058 register OUT1 - OUT3 Max current and Chopping frequency - Byte2
KP18058 register OUT4 - OUT5 Max current and Chopping frequency - Byte3

Dependencies

rpr_server sample depends on the following libraries: