示例#1
0
/**
 * @brief   Deactivates the ADC peripheral.
 *
 * @param[in] adcp      pointer to the @p ADCDriver object
 *
 * @api
 */
void adcStop(ADCDriver *adcp) {

  chDbgCheck(adcp != NULL, "adcStop");

  chSysLock();
  chDbgAssert((adcp->state == ADC_STOP) || (adcp->state == ADC_READY),
              "adcStop(), #1", "invalid state");
  adc_lld_stop(adcp);
  adcp->state = ADC_STOP;
  chSysUnlock();
}
示例#2
0
文件: adc.c 项目: TheShed/ChibiOS
/**
 * @brief   Deactivates the ADC peripheral.
 *
 * @param[in] adcp      pointer to the @p ADCDriver object
 *
 * @api
 */
void adcStop(ADCDriver *adcp) {

  osalDbgCheck(adcp != NULL);

  osalSysLock();
  osalDbgAssert((adcp->state == ADC_STOP) || (adcp->state == ADC_READY),
                "invalid state");
  adc_lld_stop(adcp);
  adcp->state = ADC_STOP;
  osalSysUnlock();
}