/* Get the Interrupt status (High Threshold or Low Threshold Interrupt).  */
int32_t VEML6030_GetIntStatus(VEML6030_Object_t *pObj, uint32_t *status)
/* Get the Interrupt status (High Threshold or Low Threshold Interrupt).  */
int32_t VEML6030_GetIntStatus(VEML6030_Object_t *pObj, uint32_t *status)
{
  int32_t ret = 0;
  uint16_t data = 0;
  if (pObj == NULL)
  {
    ret = VEML6030_INVALID_PARAM;
  }
  else if(veml6030_read_reg(&pObj->Ctx, VEML6030_REG_ALS_INT, &data, 2)!=0)
  {
    ret = VEML6030_ERROR ;
  }
  else
  {
    if((data &0x8000) == 0x8000)
    {
      *status = VEML6030_INT_TH_HIGH;
    }
    else if((data &0x4000) == 0x4000)
    {
      *status = VEML6030_INT_TH_LOW;
    }
    else
    {
      *status = VEML6030_INT_TH_NONE;
    }
  }
  return ret;
}