src/TLx4966/TLx4966.c
/**
 * @brief       Disables the sensor
 *              - If the "Interrupt measuring mode" is configured, the interrupt are enabled. 
 *              - If the "Switch power mode" is configured, the sensor is powered off.
 *              - The measuring speed timer is stopped. 
 *              
 * @param[in]   handle  Pointer to the sensor entity handle
 * @return      TLx4966 error code    
 * @retval      TLx4966_OK if success
 * @retval      TLx4966_INTF_ERROR if hardware interface error            
 */
@brief       Disables the sensor
- If the "Interrupt measuring mode" is configured, the interrupt are enabled.
- If the "Switch power mode" is configured, the sensor is powered off.
- The measuring speed timer is stopped.

@param[in]   handle  Pointer to the sensor entity handle
@return      TLx4966 error code
@retval      TLx4966_OK if success
@retval      TLx4966_INTF_ERROR if hardware interface error
@brief Disables the sensor - If the " Interrupt measuring mode " is configured the interrupt are enabled . - If the " Switch power mode " is configured the sensor is powered off . - The measuring speed timer is stopped . @param [ in ] handle Pointer to the sensor entity handle @return TLx4966 error code @retval TLx4966_OK if success @retval TLx4966_INTF_ERROR if hardware interface error
TLx4966_Error_t TLx4966_Disable(TLx4966_Handle_t *handle)
{
    if(handle->measMode == TLx4966_MEASMODE_INTERRUPT)
    {
        INTF_ASSERT(handle->hwIntf->dir->disableInt());
        INTF_ASSERT(handle->hwIntf->speed->disableInt());
    }
    if(handle->powMode == TLx4966_POWMODE_SWITCH)
        INTF_ASSERT(handle->hwIntf->power->disable());
    handle->hwIntf->timer->stop();
    handle->status = TLx4966_OFF;
    return TLx4966_OK;
}
TLx4966_Error_t TLx4966_Disable ( TLx4966_Handle_t * handle ) { if ( handle -> measMode == TLx4966_MEASMODE_INTERRUPT ) { INTF_ASSERT ( handle -> hwIntf -> dir -> disableInt ( ) ) ; INTF_ASSERT ( handle -> hwIntf -> speed -> disableInt ( ) ) ; } if ( handle -> powMode == TLx4966_POWMODE_SWITCH ) INTF_ASSERT ( handle -> hwIntf -> power -> disable ( ) ) ; handle -> hwIntf -> timer -> stop ( ) ; handle -> status = TLx4966_OFF ; return TLx4966_OK ; }
@brief       Disables the sensor
              - If the "Interrupt measuring mode" is configured, the interrupt are enabled.
@brief Disables the sensor - If the " Interrupt measuring mode " is configured the interrupt are enabled .