Esempio n. 1
0
/**
 * @brief   Deactivates the GPT peripheral.
 *
 * @param[in] gptp      pointer to the @p GPTDriver object
 *
 * @api
 */
void gptStop(GPTDriver *gptp) {

  osalDbgCheck(gptp != NULL);

  osalSysLock();
  osalDbgAssert((gptp->state == GPT_STOP) || (gptp->state == GPT_READY),
                "invalid state");
  gpt_lld_stop(gptp);
  gptp->state = GPT_STOP;
  osalSysUnlock();
}
Esempio n. 2
0
/**
 * @brief   Deactivates the GPT peripheral.
 *
 * @param[in] gptp      pointer to the @p GPTDriver object
 *
 * @api
 */
void gptStop(GPTDriver *gptp) {

  chDbgCheck(gptp != NULL, "gptStop");

  chSysLock();
  chDbgAssert((gptp->state == GPT_STOP) || (gptp->state == GPT_READY),
              "gptStop(), #1", "invalid state");
  gpt_lld_stop(gptp);
  gptp->state = GPT_STOP;
  chSysUnlock();
}