Esempio n. 1
0
static void _ftdi_unload(usbh_baseclassdriver_t *drv) {
    osalDbgCheck(drv != NULL);
    USBHFTDIDriver *const ftdip = (USBHFTDIDriver *)drv;
    USBHFTDIPortDriver *ftdipp = ftdip->ports;

    osalMutexLock(&ftdip->mtx);
    while (ftdipp) {
        _stop(ftdipp);
        ftdipp = ftdipp->next;
    }

    ftdipp = ftdip->ports;
    osalSysLock();
    while (ftdipp) {
        USBHFTDIPortDriver *next = ftdipp->next;
        usbhftdipObjectInit(ftdipp);
        ftdipp = next;
    }
    osalSysUnlock();
    osalMutexUnlock(&ftdip->mtx);
}
Esempio n. 2
0
/**
 * @brief   Releases exclusive access to the SPI bus.
 * @pre     In order to use this function the option @p SPI_USE_MUTUAL_EXCLUSION
 *          must be enabled.
 *
 * @param[in] spip      pointer to the @p SPIDriver object
 *
 * @api
 */
void spiReleaseBus(SPIDriver *spip) {

  osalDbgCheck(spip != NULL);

  osalMutexUnlock(&spip->mutex);
}
Esempio n. 3
0
/**
 * @brief   Releases exclusive access to the UART bus.
 * @pre     In order to use this function the option @p UART_USE_MUTUAL_EXCLUSION
 *          must be enabled.
 *
 * @param[in] uartp     pointer to the @p UARTDriver object
 *
 * @api
 */
void uartReleaseBus(UARTDriver *uartp) {

  osalDbgCheck(uartp != NULL);

  osalMutexUnlock(&uartp->mutex);
}
Esempio n. 4
0
/**
 * @brief   Releases exclusive access to the QSPI bus.
 * @pre     In order to use this function the option @p QSPI_USE_MUTUAL_EXCLUSION
 *          must be enabled.
 *
 * @param[in] qspip     pointer to the @p QSPIDriver object
 *
 * @api
 */
void qspiReleaseBus(QSPIDriver *qspip) {

  osalDbgCheck(qspip != NULL);

  osalMutexUnlock(&qspip->mutex);
}
Esempio n. 5
0
/**
 * @brief   Releases exclusive access to the DAC bus.
 * @pre     In order to use this function the option @p DAC_USE_MUTUAL_EXCLUSION
 *          must be enabled.
 *
 * @param[in] dacp      pointer to the @p DACDriver object
 *
 * @api
 */
void dacReleaseBus(DACDriver *dacp) {

  osalDbgCheck(dacp != NULL);
	
  osalMutexUnlock(&dacp->mutex);
}
Esempio n. 6
0
/**
 * @brief   Releases exclusive access to the ADC peripheral.
 * @pre     In order to use this function the option
 *          @p ADC_USE_MUTUAL_EXCLUSION must be enabled.
 *
 * @param[in] adcp      pointer to the @p ADCDriver object
 *
 * @api
 */
void adcReleaseBus(ADCDriver *adcp) {

  osalDbgCheck(adcp != NULL);

  osalMutexUnlock(&adcp->mutex);
}
Esempio n. 7
0
/**
 * @brief   Releases exclusive access to the I2C bus.
 * @pre     In order to use this function the option @p I2C_USE_MUTUAL_EXCLUSION
 *          must be enabled.
 *
 * @param[in] i2cp      pointer to the @p I2CDriver object
 *
 * @api
 */
void i2cReleaseBus(I2CDriver *i2cp) {

  osalDbgCheck(i2cp != NULL);

  osalMutexUnlock(&i2cp->mutex);
}