/* Measure lux and UV index using the Si1133 sensor.  */
uint32_t SI1133_measureLuxUvi(float *lux, float *uvi)
/* Measure lux and UV index using the Si1133 sensor.  */
uint32_t SI1133_measureLuxUvi(float *lux, float *uvi)
{
   SI1133_Samples_TypeDef samples;
   uint32_t retval;
   uint8_t response;
   retval = SI1133_measurementForce();
   UTIL_delay( 200 );
   retval += SI1133_registerRead( SI1133_REG_IRQ_STATUS, &response );
   while( response != 0x0F )
   {
      UTIL_delay( 5 );
      retval += SI1133_registerRead( SI1133_REG_IRQ_STATUS, &response );
   }
   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;
}