/* Convert a time in milliseconds to a combination of prescale and step_time for the execution engine programs. 
This function expects the given time in milliseconds to be in the allowed range the device can handle (0ms to 1000ms). */
static void lp5562_ms_to_prescale_and_step(struct led_data *data, uint32_t ms, uint8_t *prescale, uint8_t *step_time)
/* Convert a time in milliseconds to a combination of prescale and step_time for the execution engine programs. 
This function expects the given time in milliseconds to be in the allowed range the device can handle (0ms to 1000ms). */
static void lp5562_ms_to_prescale_and_step(struct led_data *data, uint32_t ms, uint8_t *prescale, uint8_t *step_time)
{
	if (ms < 31) {
		*prescale = 0U;
		*step_time = ms << 1;
		return;
	}
	*prescale = 1U;
	*step_time = ms >> 4;
	return;
}