本文整理汇总了C++中DEBUG_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUG_ERROR函数的具体用法?C++ DEBUG_ERROR怎么用?C++ DEBUG_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DEBUG_ERROR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: abort_endpoint
NTSTATUS abort_endpoint(libusb_device_t *dev, int endpoint, int timeout)
{
NTSTATUS status = STATUS_SUCCESS;
URB urb;
DEBUG_PRINT_NL();
DEBUG_MESSAGE("abort_endpoint(): endpoint 0x%02x\n", endpoint);
DEBUG_MESSAGE("abort_endpoint(): timeout %d\n", timeout);
memset(&urb, 0, sizeof(struct _URB_PIPE_REQUEST));
if(!dev->config.value)
{
DEBUG_ERROR("abort_endpoint(): invalid configuration 0");
return STATUS_INVALID_DEVICE_STATE;
}
if(!get_pipe_handle(dev, endpoint, &urb.UrbPipeRequest.PipeHandle))
{
DEBUG_ERROR("abort_endpoint(): getting endpoint pipe failed");
return STATUS_INVALID_PARAMETER;
}
urb.UrbHeader.Length = (USHORT) sizeof(struct _URB_PIPE_REQUEST);
urb.UrbHeader.Function = URB_FUNCTION_ABORT_PIPE;
status = call_usbd(dev, &urb, IOCTL_INTERNAL_USB_SUBMIT_URB, timeout);
if(!NT_SUCCESS(status) || !USBD_SUCCESS(urb.UrbHeader.Status))
{
DEBUG_ERROR("abort_endpoint(): request failed: status: 0x%x, "
"urb-status: 0x%x", status, urb.UrbHeader.Status);
}
return status;
}
示例2: _mdw_default_player_display_finalize
G_GNUC_INTERNAL
void
_mdw_default_player_display_finalize(MdwDefaultPlayerDisplay** p_display)
{
g_assert(p_display != NULL && *p_display != NULL);
MdwDefaultPlayerDisplay* display = *p_display;
DEBUG_INFO("Deinitializing DirectFB");
if (display->directfb_thread) {
MdwMessage* m = mdw_message_new(MDW_MESSAGE_TYPE_FINALIZE, 0);
mdw_message_put(m, display->directfb_queue);
g_assert(display->main_queue != NULL);
m = mdw_message_get(display->main_queue, TRUE);
if (m->type == MDW_MESSAGE_TYPE_FINALIZED) {
/* deinitialized */
/* g_thread_join ? */
} else {
DEBUG_ERROR("directfb_thread did not return MDW_MESSAGE_TYPE_FINALIZED");
g_assert_not_reached();
}
g_assert(g_async_queue_length(display->main_queue) == 0);
g_assert(g_async_queue_length(display->directfb_queue) == 0);
}
if (display->surface) {
display->surface->Release(display->surface);
}
if (display->window) {
display->window->Release(display->window);
}
if (display->layer) {
display->layer->Release(display->layer);
}
if (display->dfb) {
display->dfb->Release(display->dfb);
}
DEBUG_INFO("DirectFB released");
if (display->main_queue) {
g_assert(g_async_queue_length(display->main_queue) == 0);
g_async_queue_unref(display->main_queue);
}
if (display->directfb_queue) {
g_assert(g_async_queue_length(display->directfb_queue) == 0);
g_async_queue_unref(display->directfb_queue);
}
g_free(display);
*p_display = NULL;
}
示例3: while
S32 CNetObj::SndData(S8 *Buf, S32 Len, S32 Times)
{
S32 Timeout = 0, Sent = 0, SndSize = Len;
while (SndSize > 0 && m_bRuning)
{
Sent = m_Sock.Send(Buf + (Len - SndSize), SndSize, 0);
if (Sent == SOCK_HANDLE_ERROR)
{
//if (m_bClient)
//{
// ResetSock();
//}
//else
//{
// Stop();
//}
if (m_ObjInitInfo.MsgCb)
{
ADP::Msg_t Msg;
Msg.Magic = ADP_MSG_MAGIC;
Msg.Type = ADP::ADP_MSG_NET_STOP;
Msg.Live = GET_TICKS();
Msg.Body.rVal = Sent;
m_ObjInitInfo.MsgCb(Msg, m_ObjInitInfo.pMsgCbParam);
}
Stop();
DEBUG_ERROR("[ %s:%d Sock err:%d ] \n", __FILE__, __LINE__, Sent);
return MW_FAILED;
}
else if (Sent == SOCK_HANDLE_BUFFULL)
{
if (Times == 0) // send all
{
continue;
}
if (Timeout++ > Times)
{
return (Len - SndSize);
}
continue;
}
Timeout = 0;
SndSize -= Sent;
}
return (Len - SndSize);
}
示例4: davicom_pre_interrupt
/* ******************************************************************** */
void davicom_pre_interrupt(int minor_no)
{
PDAVICOM_SOFTC softc;
softc = off_to_davicom_softc(minor_no);
if (!softc)
{
DEBUG_ERROR("davicom_pre_interrupt: no softc", NOVAR, 0, 0);
return;
}
/* The isr will be masked on again when the strategy routine called */
/* from the interrupt task returns */
DRIVER_MASK_ISR_OFF(softc->dav_irq)
}
示例5: staticConstruct
void FBGfx::staticConstruct()
{
#if DEBUG_SHOULD_ERROR_CHECK
if (!glfwInit()) DEBUG_ERROR("Unable to initialize GLFW");
#else
glfwInit();
#endif
#ifdef __APPLE__
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#endif
has_context = false;
recorded_key_press = false;
}
示例6: add2epoll
static int add2epoll(int efd, int flags, int fd)
{
struct epoll_event event;
int ret;
event.data.fd = fd;
event.events = flags;
ret = epoll_ctl(efd, EPOLL_CTL_ADD, fd, &event);
if (0 != ret)
{
DEBUG_ERROR(" add to epoll error\n");
}
return ret;
}
示例7: s3c_udc_suspend_clock_gating
/*
* AHB clock gating for suspend
*/
int s3c_udc_suspend_clock_gating(void)
{
/* for 6410
u32 uReg;
DEBUG_PM("[%s]\n", __func__);
uReg = readl(S3C_UDC_OTG_PCGCCTL);
writel(uReg|1<<STOP_PCLK_BIT|1<<GATE_HCLK_BIT, S3C_UDC_OTG_PCGCCTL);
DEBUG_PM("[%s] : S3C_UDC_OTG_PCGCCTL 0x%x \n", __func__, uReg);
*/
DEBUG_ERROR("[%s] : Not Implemented \n", __func__);
return 0;
}
示例8: DymArrayPopBack
PVOID DymArrayPopBack(PUTILS_DYM_ARRAY Array)
{
PVOID ret = NULL;
DEBUG_ENTER_FUNCTION("Array=0x%p", Array);
if (Array->ValidLength > 0) {
ret = Array->Data[Array->ValidLength - 1];
Array->ValidLength--;
} else {
DEBUG_ERROR("Attempt to remove an item from an empty array (0x%p)", Array);
KeBugCheck(0);
}
DEBUG_EXIT_FUNCTION("0x%p", ret);
return ret;
}
示例9: uart_hw_poll_tx_handshake
/* Implement this only if you will have handshaking capability in your UART.
If you won't, then turn off UART_SUPPORTS_HANDSHAKING for your target.
This function should return TRUE if the remote host is ready to receive
data, FALSE otherwise. This function is called from the ISR. */
RTIP_BOOLEAN uart_hw_poll_tx_handshake(PUART_INFO uinfo)
{
dword msr_reg;
#if (UART_16550)
/* return ((RTIP_BOOLEAN)(INBYTE(uinfo->port_base + MSR) & uinfo->handshake_mask)); */
msr_reg = INBYTE(uinfo->port_base + MSR);
if (!(msr_reg & uinfo->handshake_mask))
{
DEBUG_ERROR("uart_hw_poll_tx_handshake: msr, mask = ",
DINT2, msr_reg, uinfo->handshake_mask);
}
return ((RTIP_BOOLEAN)(msr_reg & uinfo->handshake_mask));
#else
#error Implement checking if remote can recv
#endif
}
示例10: s3c_udc_enable
/*
* until it becomes enabled, this UDC should be completely invisible
* to any USB host.
*/
static int s3c_udc_enable(struct s3c_udc *dev)
{
u32 reg_val;
DEBUG_SETUP("%s: %p\n", __func__, dev);
#if USING_MACH_OTG_PHY
otg_phy_init();
#else
writel(1, S5P_USB_PHY_CONTROL);
writel(0xa0, S3C_USBOTG_PHYPWR); /* Power up */
writel(OTGH_PHY_CLK_VALUE, S3C_USBOTG_PHYCLK);
writel(0x1, S3C_USBOTG_RSTCON);
udelay(50);
writel(0x0, S3C_USBOTG_RSTCON);
udelay(50);
#endif
dev->udc_state = USB_STATE_POWERED;
dev->gadget.speed = USB_SPEED_UNKNOWN;
/* 14. Initialize OTG Link Core. */
writel(GAHBCFG_INIT, S3C_UDC_OTG_GAHBCFG);
writel( 0<<15 // PHY Low Power Clock sel
|1<<14 // Non-Periodic TxFIFO Rewind Enable
|0x5<<10 // Turnaround time
|0<<9|0<<8 // [0:HNP disable, 1:HNP enable][ 0:SRP disable, 1:SRP enable] H1= 1,1
|0<<7 // Ulpi DDR sel
|0<<6 // 0: high speed utmi+, 1: full speed serial
|0<<4 // 0: utmi+, 1:ulpi
|1<<3 // phy i/f 0:8bit, 1:16bit
|0x7<<0, // HS/FS Timeout*
S3C_UDC_OTG_GUSBCFG);
s3c_udc_initialize(dev);
//change proper register instead of S3C_UDC_OTG_GINTMSK
reg_val = readl(S3C_UDC_OTG_GINTMSK);
if(!reg_val)
{
DEBUG_ERROR("[%s] Fail to set GINTMSK 0x%x\n", __func__, reg_val);
return -1;
}
return 0;
}
示例11: _iface_mdw_demux_set_ts_source
static gboolean
_iface_mdw_demux_set_ts_source (MdwDemux *iface, MdwTsSource* source)
{
g_return_val_if_fail(iface != NULL, FALSE);
//g_return_val_if_fail(source != NULL, FALSE);
MdwDvbDemuxPrivate *priv = MDW_DVB_DEMUX_GET_PRIVATE(iface);
/* there's a dependency between source and handlers and the source cannot be changed to a incompatible type*/
if (source != NULL && priv->source != NULL ) {
//g_return_val_if_fail(priv->source == NULL, FALSE);
//return FALSE;
if (!(MDW_IS_TS_SOURCE(priv->source) && MDW_IS_TS_SOURCE(source))) {
return FALSE;
}
}
if (source && MDW_IS_TS_FILE_SOURCE(source)) {
if (priv->dvr_fd == -1) {
gint fd;
if (G_UNLIKELY((fd = open(priv->dvr_device, O_WRONLY | O_NONBLOCK))== -1)) {
gchar err_msg[1024];
g_snprintf(err_msg, 1024,
"Cannot open demux dvr_device '%s':%s",
priv->dvr_device, g_strerror(errno));
//g_set_error(error, G_FILE_ERROR, g_file_error_from_errno(errno), err_msg);
DEBUG_ERROR(err_msg);
return FALSE;
}
priv->dvr_fd = fd;
}
}
if (priv->source) {
g_object_unref(priv->source);
}
if (source) {
g_object_ref(source);
}
priv->source = source;
return TRUE;
}
示例12: DEBUG_ERROR
ADP::RspStreamOpen_t CNetObj::Open(ADP::ReqStreamOpen_t Req, InitObjInfo_t Info, S32 mSec)
{
ADP::RspStreamOpen_t RspVal;
RspVal.rVal = m_Sock.SetClient(Req.URL);
if (RspVal.rVal != MW_SUCC)
{
DEBUG_ERROR("Connect err\n");
return RspVal;
}
m_ObjInitInfo = Info;
m_StrUrl = Req.URL;
m_bResetSock = false;
m_bRuning = true;
m_tNetHandle = ::CreateNormalThread(NetThreadProc, this, 512 * 1024);
ADP::Msg_t Msg;
Msg.Type = ADP::ADP_CMD_REQ_STREAM_OPEN;
Msg.Body.ReqStreamOpen = Req;
Msg.RspId = m_MsgRspId++;
RspVal.rVal = SndMsg(Msg, mSec);
if (RspVal.rVal != MW_SUCC)
{
goto ERR_EXIT;
}
RspVal.rVal = RcvMsg(Msg, mSec);
if (RspVal.rVal != MW_SUCC)
{
RspVal.rVal = NET_MSG_TIME_OUT;
goto ERR_EXIT;
}
if (MW_SUCC != Msg.Body.RspStreamOpen.rVal)
{
Msg.Type = ADP::ADP_CMD_REQ_STREAM_OPEN;
Msg.Body.ReqStreamClose.Token = Msg.Body.RspStreamOpen.Token;
SndMsg(Msg, mSec);
RspVal.rVal = Msg.Body.RspStreamOpen.rVal;
goto ERR_EXIT;
}
return Msg.Body.RspStreamOpen;
ERR_EXIT:
Stop();
return RspVal;
}
示例13: gpio_set_level
int gpio_set_level(int fd, IOCTL_GPIO_ARG_ST *parg)
{
int i;
int ret = RET_SUCCESS;
if (NULL == parg)
{
return RET_FAILED;
}
if ((GPIO_LEVEL_LOW != parg->gpio_level) && (GPIO_LEVEL_HIGHT != parg->gpio_level))
{
DEBUG_ERROR("Invalid argument!\n");
return RET_FAILED;
}
ret = ioctl(fd, IOCTL_GPIO_LEVEL_SET, parg);
return ret;
}
示例14: DEBUG_PRINT
unsigned int Resources::audio(const std::string &audioFile)
{
std::string fullpath;
if (audioMap.find(audioFile) == audioMap.end()) {
DEBUG_PRINT("loading " << audioFile);
if (search_path(audioFile, fullpath)) {
audioMap[audioFile] = load_wav(fullpath);
}
else {
DEBUG_ERROR("file " << audioFile << " doesnt exist or not reachable");
}
}
else {
DEBUG_PRINT("using already loaded " << audioFile);
}
return audioMap[audioFile];
}
示例15: s3c_udc_enable
/*
* until it becomes enabled, this UDC should be completely invisible
* to any USB host.
*/
static int s3c_udc_enable(struct s3c_udc *dev)
{
u32 reg_val;
DEBUG_SETUP("%s: %p\n", __func__, dev);
reg_val = readl(S3C_OTHERS);
reg_val |= (1<<16); // USB_SIG_MASK
writel(reg_val, S3C_OTHERS);
// 1. Initializes OTG Phy.
writel(0x0, S3C_USBOTG_PHYPWR);
writel(0x20, S3C_USBOTG_PHYCLK);
writel(0x1, S3C_USBOTG_RSTCON);
// confirm delay time with thinking pm logic
udelay(50);
writel(0x0, S3C_USBOTG_RSTCON);
udelay(50);
dev->udc_state = USB_STATE_POWERED;
dev->gadget.speed = USB_SPEED_UNKNOWN;
/* 14. Initialize OTG Link Core. */
writel(GAHBCFG_INIT, S3C_UDC_OTG_GAHBCFG);
writel( 0<<15 // PHY Low Power Clock sel
|1<<14 // Non-Periodic TxFIFO Rewind Enable
|0x5<<10 // Turnaround time
|0<<9|0<<8 // [0:HNP disable, 1:HNP enable][ 0:SRP disable, 1:SRP enable] H1= 1,1
|0<<7 // Ulpi DDR sel
|0<<6 // 0: high speed utmi+, 1: full speed serial
|0<<4 // 0: utmi+, 1:ulpi
|1<<3 // phy i/f 0:8bit, 1:16bit
|0x7<<0, // HS/FS Timeout*
S3C_UDC_OTG_GUSBCFG);
s3c_udc_initialize(dev);
//change proper register instead of S3C_UDC_OTG_GINTMSK
reg_val = readl(S3C_UDC_OTG_GINTMSK);
if(!reg_val)
{
DEBUG_ERROR("[%s] Fail to set GINTMSK 0x%x\n", __func__, reg_val);
return -1;
}
return 0;
}