src/APDS9930.cpp
bool APDS9930::setAmbientLightIntEnable(uint8_t enable)
{
    uint8_t val;
    
    /* Read value from ENABLE register */
    if( !wireReadDataByte(APDS9930_ENABLE, val) ) {
        return false;
    }
    
    /* Set bits in register to given value */
    enable &= 0b00000001;
    enable = enable << 4;
    val &= 0b11101111;
    val |= enable;
    
    /* Write register value back into ENABLE register */
    if( !wireWriteDataByte(APDS9930_ENABLE, val) ) {
        return false;
    }
    
    return true;
}
/**
 * @brief Turns ambient light interrupts on or off
 *
 * @param[in] enable 1 to enable interrupts, 0 to turn them off
 * @return True if operation successful. False otherwise.
 */
@brief Turns ambient light interrupts on or off
@param[in] enable 1 to enable interrupts, 0 to turn them off
@return True if operation successful. False otherwise.
@brief Turns ambient light interrupts on or off @param [ in ] enable 1 to enable interrupts 0 to turn them off @return True if operation successful . False otherwise .
bool APDS9930::setAmbientLightIntEnable(uint8_t enable)
{
    uint8_t val;
    if( !wireReadDataByte(APDS9930_ENABLE, val) ) {
        return false;
    }
    enable &= 0b00000001;
    enable = enable << 4;
    val &= 0b11101111;
    val |= enable;
    if( !wireWriteDataByte(APDS9930_ENABLE, val) ) {
        return false;
    }
    return true;
}
bool APDS9930 :: setAmbientLightIntEnable ( uint8_t enable ) { uint8_t val ; if ( ! wireReadDataByte ( APDS9930_ENABLE , val ) ) { return false ; } enable &= 0b00000001 ; enable = enable << 4 ; val &= 0b11101111 ; val |= enable ; if ( ! wireWriteDataByte ( APDS9930_ENABLE , val ) ) { return false ; } return true ; }
@brief Turns ambient light interrupts on or off
 @param[in] enable 1 to enable interrupts, 0 to turn them off
 @return True if operation successful.
@brief Turns ambient light interrupts on or off @param [ in ] enable 1 to enable interrupts 0 to turn them off @return True if operation successful .
/* Read value from ENABLE register */ /* Set bits in register to given value */ /* Write register value back into ENABLE register */