void adc_close(void) { tick_remove_task(adc_tick); while (MBSR2 & IBB) /* Wait for an ongoing transfer to finish */ sleep(1); }
/* Cancels a timeout callback - can be called from the ISR */ void timeout_cancel(struct timeout *tmo) { int oldlevel = disable_irq_save(); int rc = remove_array_ptr((void **)tmo_list, tmo); if(rc >= 0 && *tmo_list == NULL) { tick_remove_task(timeout_tick); /* Last one - remove task */ } restore_irq(oldlevel); }
void usb_close(void) { unsigned int thread = usb_thread_entry; usb_thread_entry = 0; if (thread == 0) return; #ifndef USB_STATUS_BY_EVENT tick_remove_task(usb_tick); #endif usb_monitor_enabled = false; queue_post(&usb_queue, USB_QUIT, 0); thread_wait(thread); }
void usb_drv_exit(void) { tick_remove_task(usb_tick); USB_DEV_CTRL |= (1<<10); /* soft disconnect */ usb_phy_suspend(); /* * mask all interrupts _before_ writing to VIC_INT_EN_CLEAR, * or else the core might latch the interrupt while * the write ot VIC_INT_EN_CLEAR is in the pipeline and * so cause a fake spurious interrupt. */ USB_DEV_EP_INTR_MASK = 0xffffffff; USB_DEV_INTR_MASK = 0xffffffff; VIC_INT_EN_CLEAR = INTERRUPT_USB; CGU_USB &= ~(1<<5); bitclr32(&CGU_PERI, CGU_USB_CLOCK_ENABLE); /* Disable UVDD generating LDO */ ascodec_write(AS3515_USB_UTIL, ascodec_read(AS3515_USB_UTIL) & ~(1<<4)); usb_disable_pll(); cpu_boost(0); initialized = false; logf("usb_drv_exit() !!!!\n"); }
void button_close(void) { tick_remove_task(button_tick); }
void charging_algorithm_close(void) { #if IMX233_SUBTARGET >= 3780 tick_remove_task(&ramp_up_4p2_rail); #endif }