示例#1
0
void samaCryptoDriverStop(CRYDriver *cryp) {
#if defined(SAMA_DMA_REQUIRED)
	if (cryp->config->transfer_mode == TRANSFER_DMA)
	{
		dmaChannelRelease(cryp->dmarx);
		dmaChannelRelease(cryp->dmatx);
	}
#endif
	samaCryptoDriverDisable(cryp);
}
示例#2
0
/**
 * @brief   Deactivates the DAC peripheral.
 *
 * @param[in] dacp      pointer to the @p DACDriver object
 *
 * @notapi
 */
void dac_lld_stop(DACDriver *dacp) {

  /* If in ready state then disables the DAC clock.*/
  if (dacp->state == DAC_READY) {

    /* DMA disable.*/
    dmaChannelDisable(LPC17xx_DAC_DMA_CHANNEL);
    dmaChannelRelease(LPC17xx_DAC_DMA_CHANNEL);

    /* Disable DAC */
    LPC_PINCON->PINSEL1 &= ~(2UL << 20);   /* Disable AOUT P0.26 pin.*/
  }
}