void tc_shutdown (tc_t tc) { /* Disable peripheral clock. */ mcu_pmc_disable (ID_TC0 + TC_CHANNEL (tc)); irq_disable (ID_TC0 + TC_CHANNEL (tc)); /* Perhaps should force TC output pin low? */ }
void usart0_shutdown (void) { /* Disable RxD0 and TxD0 pins. */ pio_config_set (TXD0_PIO, PIO_PULLUP); pio_config_set (RXD0_PIO, PIO_OUTPUT_LOW); /* Disable USART0 clock. */ mcu_pmc_disable (ID_USART0); /* Reset and disable receiver and transmitter. */ USART0->US_CR = US_CR_RSTRX | US_CR_RSTTX | US_CR_RXDIS | US_CR_TXDIS; }
void adc_shutdown (adc_t adc) { /* TODO. */ mcu_pmc_disable (ID_ADC); }