本文整理汇总了C++中osalDbgCheckClassI函数的典型用法代码示例。如果您正苦于以下问题:C++ osalDbgCheckClassI函数的具体用法?C++ osalDbgCheckClassI怎么用?C++ osalDbgCheckClassI使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osalDbgCheckClassI函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: usbDisableEndpointsI
/**
* @brief Disables all the active endpoints.
* @details This function disables all the active endpoints except the
* endpoint zero.
* @note This function must be invoked in response of a SET_CONFIGURATION
* message with configuration number zero.
*
* @param[in] usbp pointer to the @p USBDriver object
*
* @iclass
*/
void usbDisableEndpointsI(USBDriver *usbp) {
unsigned i;
osalDbgCheckClassI();
osalDbgCheck(usbp != NULL);
osalDbgAssert(usbp->state == USB_ACTIVE, "invalid state");
usbp->transmitting &= 1U;
usbp->receiving &= 1U;
for (i = 1; i <= (unsigned)USB_MAX_ENDPOINTS; i++) {
#if USB_USE_WAIT == TRUE
/* Signaling the event to threads waiting on endpoints.*/
if (usbp->epc[i] != NULL) {
osalSysLockFromISR();
if (usbp->epc[i]->in_state != NULL) {
osalThreadResumeI(&usbp->epc[i]->in_state->thread, MSG_RESET);
}
if (usbp->epc[i]->out_state != NULL) {
osalThreadResumeI(&usbp->epc[i]->out_state->thread, MSG_RESET);
}
osalSysUnlockFromISR();
}
#endif
usbp->epc[i] = NULL;
}
/* Low level endpoints deactivation.*/
usb_lld_disable_endpoints(usbp);
}
开发者ID:autosportlabs,项目名称:OBD2CAN,代码行数:41,代码来源:usb.c
示例2: oqResetI
/**
* @brief Resets an output queue.
* @details All the data in the output queue is erased and lost, any waiting
* thread is resumed with status @p Q_RESET.
* @note A reset operation can be used by a low level driver in order to
* obtain immediate attention from the high level layers.
*
* @param[in] oqp pointer to an @p output_queue_t structure
*
* @iclass
*/
void oqResetI(output_queue_t *oqp) {
osalDbgCheckClassI();
oqp->q_rdptr = oqp->q_buffer;
oqp->q_wrptr = oqp->q_buffer;
oqp->q_counter = qSizeX(oqp);
osalThreadDequeueAllI(&oqp->q_waiting, Q_RESET);
}
开发者ID:SVentas,项目名称:SmartMDC,代码行数:20,代码来源:hal_queues.c
示例3: iqResetI
/**
* @brief Resets an input queue.
* @details All the data in the input queue is erased and lost, any waiting
* thread is resumed with status @p Q_RESET.
* @note A reset operation can be used by a low level driver in order to
* obtain immediate attention from the high level layers.
*
* @param[in] iqp pointer to an @p input_queue_t structure
*
* @iclass
*/
void iqResetI(input_queue_t *iqp) {
osalDbgCheckClassI();
iqp->q_rdptr = iqp->q_buffer;
iqp->q_wrptr = iqp->q_buffer;
iqp->q_counter = 0;
osalThreadDequeueAllI(&iqp->q_waiting, Q_RESET);
}
开发者ID:SVentas,项目名称:SmartMDC,代码行数:20,代码来源:hal_queues.c
示例4: ili9341UnselectI
/**
* @brief Deasserts the slave select signal.
* @details The previously selected peripheral is unselected.
* @pre ILI9341 is active.
*
* @param[in] driverp pointer to the @p ILI9341Driver object
*
* @iclass
*/
void ili9341UnselectI(ILI9341Driver *driverp) {
osalDbgCheckClassI();
osalDbgCheck(driverp != NULL);
osalDbgAssert(driverp->state == ILI9341_ACTIVE, "invalid state");
spiUnselectI(driverp->config->spi);
driverp->state = ILI9341_READY;
}
开发者ID:1847123212,项目名称:ebike-controller,代码行数:18,代码来源:ili9341.c
示例5: gptStartContinuousI
/**
* @brief Starts the timer in continuous mode.
*
* @param[in] gptp pointer to the @p GPTDriver object
* @param[in] interval period in ticks
*
* @iclass
*/
void gptStartContinuousI(GPTDriver *gptp, gptcnt_t interval) {
osalDbgCheckClassI();
osalDbgCheck(gptp != NULL);
osalDbgAssert(gptp->state == GPT_READY,
"invalid state");
gptp->state = GPT_CONTINUOUS;
gpt_lld_start_timer(gptp, interval);
}
开发者ID:AlexShiLucky,项目名称:ChibiOS,代码行数:18,代码来源:hal_gpt.c
示例6: uartStartSendI
/**
* @brief Starts a transmission on the UART peripheral.
* @note The buffers are organized as uint8_t arrays for data sizes below
* or equal to 8 bits else it is organized as uint16_t arrays.
* @note This function has to be invoked from a lock zone.
*
* @param[in] uartp pointer to the @p UARTDriver object
* @param[in] n number of data frames to send
* @param[in] txbuf the pointer to the transmit buffer
*
* @iclass
*/
void uartStartSendI(UARTDriver *uartp, size_t n, const void *txbuf) {
osalDbgCheckClassI();
osalDbgCheck((uartp != NULL) && (n > 0U) && (txbuf != NULL));
osalDbgAssert(uartp->state == UART_READY, "is active");
osalDbgAssert(uartp->txstate != UART_TX_ACTIVE, "tx active");
uart_lld_start_send(uartp, n, txbuf);
uartp->txstate = UART_TX_ACTIVE;
}
开发者ID:AlexShiLucky,项目名称:ChibiOS,代码行数:22,代码来源:hal_uart.c
示例7: gptStartOneShotI
/**
* @brief Starts the timer in one shot mode.
*
* @param[in] gptp pointer to the @p GPTDriver object
* @param[in] interval time interval in ticks
*
* @api
*/
void gptStartOneShotI(GPTDriver *gptp, gptcnt_t interval) {
osalDbgCheckClassI();
osalDbgCheck(gptp != NULL);
osalDbgAssert(gptp->state == GPT_READY,
"invalid state");
gptp->state = GPT_ONESHOT;
gpt_lld_start_timer(gptp, interval);
}
开发者ID:eos1d3,项目名称:OpenTCS,代码行数:18,代码来源:gpt.c
示例8: sdIncomingDataI
/**
* @brief Handles incoming data.
* @details This function must be called from the input interrupt service
* routine in order to enqueue incoming data and generate the
* related events.
* @note The incoming data event is only generated when the input queue
* becomes non-empty.
* @note In order to gain some performance it is suggested to not use
* this function directly but copy this code directly into the
* interrupt service routine.
*
* @param[in] sdp pointer to a @p SerialDriver structure
* @param[in] b the byte to be written in the driver's Input Queue
*
* @iclass
*/
void sdIncomingDataI(SerialDriver *sdp, uint8_t b) {
osalDbgCheckClassI();
osalDbgCheck(sdp != NULL);
if (iqIsEmptyI(&sdp->iqueue))
chnAddFlagsI(sdp, CHN_INPUT_AVAILABLE);
if (iqPutI(&sdp->iqueue, b) < MSG_OK)
chnAddFlagsI(sdp, SD_QUEUE_FULL_ERROR);
}
开发者ID:KTannenberg,项目名称:ChibiOS,代码行数:26,代码来源:hal_serial.c
示例9: uartStartReceiveI
/**
* @brief Starts a receive operation on the UART peripheral.
* @note The buffers are organized as uint8_t arrays for data sizes below
* or equal to 8 bits else it is organized as uint16_t arrays.
* @note This function has to be invoked from a lock zone.
*
* @param[in] uartp pointer to the @p UARTDriver object
* @param[in] n number of data frames to receive
* @param[out] rxbuf the pointer to the receive buffer
*
* @iclass
*/
void uartStartReceiveI(UARTDriver *uartp, size_t n, void *rxbuf) {
osalDbgCheckClassI();
osalDbgCheck((uartp != NULL) && (n > 0U) && (rxbuf != NULL));
osalDbgAssert(uartp->state == UART_READY, "is active");
osalDbgAssert(uartp->rxstate != UART_RX_ACTIVE, "rx active");
uart_lld_start_receive(uartp, n, rxbuf);
uartp->rxstate = UART_RX_ACTIVE;
}
开发者ID:AlexShiLucky,项目名称:ChibiOS,代码行数:22,代码来源:hal_uart.c
示例10: sdRequestDataI
/**
* @brief Handles outgoing data.
* @details Must be called from the output interrupt service routine in order
* to get the next byte to be transmitted.
* @note In order to gain some performance it is suggested to not use
* this function directly but copy this code directly into the
* interrupt service routine.
*
* @param[in] sdp pointer to a @p SerialDriver structure
* @return The byte value read from the driver's output queue.
* @retval MSG_TIMEOUT if the queue is empty (the lower driver usually
* disables the interrupt source when this happens).
*
* @iclass
*/
msg_t sdRequestDataI(SerialDriver *sdp) {
msg_t b;
osalDbgCheckClassI();
osalDbgCheck(sdp != NULL);
b = oqGetI(&sdp->oqueue);
if (b < MSG_OK)
chnAddFlagsI(sdp, CHN_OUTPUT_EMPTY);
return b;
}
开发者ID:KTannenberg,项目名称:ChibiOS,代码行数:26,代码来源:hal_serial.c
示例11: gptStopTimerI
/**
* @brief Stops the timer.
*
* @param[in] gptp pointer to the @p GPTDriver object
*
* @api
*/
void gptStopTimerI(GPTDriver *gptp) {
osalDbgCheckClassI();
osalDbgCheck(gptp != NULL);
osalDbgAssert((gptp->state == GPT_READY) || (gptp->state == GPT_CONTINUOUS) ||
(gptp->state == GPT_ONESHOT),
"invalid state");
gptp->state = GPT_READY;
gpt_lld_stop_timer(gptp);
}
开发者ID:AlexShiLucky,项目名称:ChibiOS,代码行数:18,代码来源:hal_gpt.c
示例12: usbStallReceiveI
/**
* @brief Stalls an OUT endpoint.
*
* @param[in] usbp pointer to the @p USBDriver object
* @param[in] ep endpoint number
*
* @return The operation status.
* @retval false Endpoint stalled.
* @retval true Endpoint busy, not stalled.
*
* @iclass
*/
bool usbStallReceiveI(USBDriver *usbp, usbep_t ep) {
osalDbgCheckClassI();
osalDbgCheck(usbp != NULL);
if (usbGetReceiveStatusI(usbp, ep))
return true;
usb_lld_stall_out(usbp, ep);
return false;
}
开发者ID:hmchen1,项目名称:ChibiOS,代码行数:23,代码来源:usb.c
示例13: usbStallTransmitI
/**
* @brief Stalls an IN endpoint.
*
* @param[in] usbp pointer to the @p USBDriver object
* @param[in] ep endpoint number
*
* @return The operation status.
* @retval false Endpoint stalled.
* @retval true Endpoint busy, not stalled.
*
* @iclass
*/
bool usbStallTransmitI(USBDriver *usbp, usbep_t ep) {
osalDbgCheckClassI();
osalDbgCheck(usbp != NULL);
if (usbGetTransmitStatusI(usbp, ep))
return true;
usb_lld_stall_in(usbp, ep);
return false;
}
开发者ID:hmchen1,项目名称:ChibiOS,代码行数:23,代码来源:usb.c
示例14: usbStartTransmitI
/**
* @brief Starts a transmit transaction on an IN endpoint.
* @post The endpoint callback is invoked when the transfer has been
* completed.
*
* @param[in] usbp pointer to the @p USBDriver object
* @param[in] ep endpoint number
*
* @return The operation status.
* @retval FALSE Operation started successfully.
* @retval TRUE Endpoint busy, operation not started.
*
* @iclass
*/
bool usbStartTransmitI(USBDriver *usbp, usbep_t ep) {
osalDbgCheckClassI();
osalDbgCheck(usbp != NULL);
if (usbGetTransmitStatusI(usbp, ep))
return TRUE;
usbp->transmitting |= (1 << ep);
usb_lld_start_in(usbp, ep);
return FALSE;
}
开发者ID:mandrake,项目名称:ChibiOS-Tiva,代码行数:26,代码来源:usb.c
示例15: usbStartReceiveI
/**
* @brief Starts a receive transaction on an OUT endpoint.
* @post The endpoint callback is invoked when the transfer has been
* completed.
*
* @param[in] usbp pointer to the @p USBDriver object
* @param[in] ep endpoint number
*
* @return The operation status.
* @retval FALSE Operation started successfully.
* @retval TRUE Endpoint busy, operation not started.
*
* @iclass
*/
bool usbStartReceiveI(USBDriver *usbp, usbep_t ep) {
osalDbgCheckClassI();
osalDbgCheck(usbp != NULL);
if (usbGetReceiveStatusI(usbp, ep))
return TRUE;
usbp->receiving |= (1 << ep);
usb_lld_start_out(usbp, ep);
return FALSE;
}
开发者ID:mandrake,项目名称:ChibiOS-Tiva,代码行数:26,代码来源:usb.c
示例16: uartStopReceiveI
/**
* @brief Stops any ongoing receive operation.
* @note Stopping a receive operation also suppresses the receive callbacks.
* @note This function has to be invoked from a lock zone.
*
* @param[in] uartp pointer to the @p UARTDriver object
*
* @return The number of data frames not received by the
* stopped receive operation.
* @retval 0 There was no receive operation in progress.
*
* @iclass
*/
size_t uartStopReceiveI(UARTDriver *uartp) {
osalDbgCheckClassI();
osalDbgCheck(uartp != NULL);
osalDbgAssert(uartp->state == UART_READY, "not active");
if (uartp->rxstate == UART_RX_ACTIVE) {
size_t n = uart_lld_stop_receive(uartp);
uartp->rxstate = UART_RX_IDLE;
return n;
}
return 0;
}
开发者ID:AlexShiLucky,项目名称:ChibiOS,代码行数:26,代码来源:hal_uart.c
示例17: usbStartTransmitI
/**
* @brief Starts a transmit transaction on an IN endpoint.
* @post The endpoint callback is invoked when the transfer has been
* completed.
*
* @param[in] usbp pointer to the @p USBDriver object
* @param[in] ep endpoint number
*
* @return The operation status.
* @retval false Operation started successfully.
* @retval true Endpoint busy, operation not started.
*
* @iclass
*/
bool usbStartTransmitI(USBDriver *usbp, usbep_t ep) {
osalDbgCheckClassI();
osalDbgCheck(usbp != NULL);
if (usbGetTransmitStatusI(usbp, ep)) {
return true;
}
usbp->transmitting |= (uint16_t)((unsigned)1U << (unsigned)ep);
usb_lld_start_in(usbp, ep);
return false;
}
开发者ID:1847123212,项目名称:ebike-controller,代码行数:27,代码来源:usb.c
示例18: usbStartReceiveI
/**
* @brief Starts a receive transaction on an OUT endpoint.
* @post The endpoint callback is invoked when the transfer has been
* completed.
*
* @param[in] usbp pointer to the @p USBDriver object
* @param[in] ep endpoint number
*
* @return The operation status.
* @retval false Operation started successfully.
* @retval true Endpoint busy, operation not started.
*
* @iclass
*/
bool usbStartReceiveI(USBDriver *usbp, usbep_t ep) {
osalDbgCheckClassI();
osalDbgCheck(usbp != NULL);
if (usbGetReceiveStatusI(usbp, ep)) {
return true;
}
usbp->receiving |= (uint16_t)((unsigned)1U << (unsigned)ep);
usb_lld_start_out(usbp, ep);
return false;
}
开发者ID:1847123212,项目名称:ebike-controller,代码行数:27,代码来源:usb.c
示例19: spiAbortI
/**
* @brief Aborts the ongoing SPI operation.
*
* @param[in] spip pointer to the @p SPIDriver object
*
* @iclass
*/
void spiAbortI(SPIDriver *spip) {
osalDbgCheckClassI();
osalDbgCheck(spip != NULL);
osalDbgAssert((spip->state == SPI_ACTIVE) || (spip->state == SPI_COMPLETE),
"invalid state");
spi_lld_abort(spip);
spip->state = SPI_READY;
#if SPI_USE_WAIT == TRUE
osalThreadResumeI(&spip->thread, MSG_OK);
#endif
}
开发者ID:rusefi,项目名称:ChibiOS,代码行数:21,代码来源:hal_spi.c
示例20: usbDisableEndpointsI
/**
* @brief Disables all the active endpoints.
* @details This function disables all the active endpoints except the
* endpoint zero.
* @note This function must be invoked in response of a SET_CONFIGURATION
* message with configuration number zero.
*
* @param[in] usbp pointer to the @p USBDriver object
*
* @iclass
*/
void usbDisableEndpointsI(USBDriver *usbp) {
unsigned i;
osalDbgCheckClassI();
osalDbgCheck(usbp != NULL);
osalDbgAssert(usbp->state == USB_SELECTED, "invalid state");
usbp->transmitting &= ~1;
usbp->receiving &= ~1;
for (i = 1; i <= USB_MAX_ENDPOINTS; i++)
usbp->epc[i] = NULL;
/* Low level endpoints deactivation.*/
usb_lld_disable_endpoints(usbp);
}
开发者ID:hmchen1,项目名称:ChibiOS,代码行数:26,代码来源:usb.c
注:本文中的osalDbgCheckClassI函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论