/* Retrieve the sample values from the chip and convert them to lux and UV index values.  */
uint32_t SI1133_getMeasurement(float *lux, float *uvi)
/* Retrieve the sample values from the chip and convert them to lux and UV index values.  */
uint32_t SI1133_getMeasurement(float *lux, float *uvi)
{
   SI1133_Samples_TypeDef samples;
   uint32_t retval;
   retval = SI1133_measurementGet( &samples );
   *lux = (float) SI1133_getLux( samples.ch1, samples.ch3, samples.ch2, &lk );
   *lux = *lux / ( 1 << LUX_OUTPUT_FRACTION );
   *uvi = (float) SI1133_getUv( samples.ch0, uk );
   *uvi = *uvi / ( 1 << UV_OUTPUT_FRACTION );
   return retval;
}