• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ printke函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中printke函数的典型用法代码示例。如果您正苦于以下问题:C++ printke函数的具体用法?C++ printke怎么用?C++ printke使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了printke函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: kr_mkv_check_ebml_header

static int kr_mkv_check_ebml_header (kr_mkv_t *mkv) {

  char doctype[64];
  uint32_t version;
  uint32_t read_version;
  

  if (0 > kr_ebml2_unpack_header (mkv->e, doctype, 64,
                                  &version, &read_version)) {
    printke ("Could not read EBML header");
    return -1;                            
  }

  if ((strncmp(doctype, "webm", 4) != 0) &&
      (strncmp(doctype, "matroska", 8) != 0)) {
    printke ("Invalid Doctype: %s", doctype);
    return -1;      
  }
  
  if ((version < 2) || (version > 4) ||
      (read_version < 2) || (read_version > 4)) {
    printke ("Crazy Version Number: %u - %u",
              version, read_version);
    return -1;
  }

  printk ("Got EBML doctype: %s Version %u Read Version %u",
          doctype, version, read_version);

  return 0;
}
开发者ID:brooss,项目名称:krcam,代码行数:31,代码来源:krad_mkv_demux.c


示例2: krad_system_set_thread_name

void *kr_audioport_process_thread (void *arg) {

  kr_audioport_t *kr_audioport = (kr_audioport_t *)arg;
  int ret;
  char buf[1];
  
  krad_system_set_thread_name ("krc_audioport");

  while (kr_audioport->active == 1) {
  
    // wait for socket to have a byte
    ret = read (kr_audioport->sd, buf, 1);
    if (ret != 1) {
      printke ("krad mixer client: unexpected read return value %d in kr_audioport_process_thread", ret);
    }
    //kr_audioport->callback (kr_audioport->kr_shm->buffer, kr_audioport->pointer);
    kr_audioport->callback (1600, kr_audioport->pointer);

    // write a byte to socket
    ret = write (kr_audioport->sd, buf, 1);
    if (ret != 1) {
      printke ("krad mixer client: unexpected write return value %d in kr_audioport_process_thread", ret);
    }

  }

  return NULL;
}
开发者ID:imclab,项目名称:krad_radio,代码行数:28,代码来源:krad_mixer_client.c


示例3: kr_mkv_parse_tracks

static int kr_mkv_parse_tracks (kr_mkv_t *mkv, uint64_t max_pos) {

  int ret;
  uint32_t id;
  uint64_t size;

  while (1) {
    if (mkv->e->pos >= max_pos) {
      printk ("Got to end of tracks info");
      break;
    }  
    ret = kr_ebml2_unpack_id (mkv->e, &id, &size);
    if (ret < 0) {
      printke ("Read error...");
      return -1;
    }
    if ((id == MKV_CLUSTER) || (id == EID_VOID) ||
        (id == EID_CRC32) || (id == MKV_TAGS) || (id == MKV_CUES) ||
        (id == MKV_ATTACHMENTS) || (id == MKV_CHAPTERS)) {
      printk ("Done with tracks. Got %d", mkv->track_count);
      return 0;
    }
    if (id != MKV_TRACK) {
      printke ("No Track :/");
      return -1;
    }
    printk ("Got Track!");
    ret = kr_mkv_parse_track (mkv, mkv->e->pos + size);
    if (ret < 0) {
      printke ("Track parse error...");
      return -1;
    }
  }
  return 0;
}
开发者ID:brooss,项目名称:krcam,代码行数:35,代码来源:krad_mkv_demux.c


示例4: kr_vorbis_encode

int32_t kr_vorbis_encode (krad_vorbis_t *vorbis,
                          kr_codeme_t *codeme,
                          kr_medium_t *medium) {
  int32_t bo_ret;
  int32_t ret;
  int c;
  float **pcm;
  ogg_packet op;

  if (medium != NULL) {
    if (medium->a.count > 0) {
      pcm = vorbis_analysis_buffer (&vorbis->vdsp, medium->a.count);
      for (c = 0; c < vorbis->channels; c++) {
        memcpy (pcm[c], medium->a.samples[c], medium->a.count * 4);
      }
    } else {
      printk ("KR Vorbis Encoder: Got finish notice");
    }
    ret = vorbis_analysis_wrote (&vorbis->vdsp, medium->a.count);
    if (ret < 0) {
      vorbis->error = ret;
      vorbis->state_str = "Krad Vorbis Encoder: vorbis_analysis_wrote fail";
      printke (vorbis->state_str);
      return -1;
    }
    //printk ("KR Vorbis Encoder: wrote %d samples", medium->a.count);
  }

  bo_ret = vorbis_analysis_blockout (&vorbis->vdsp, &vorbis->vblock);
  if (bo_ret < 0) {
    vorbis->error = bo_ret;
    vorbis->state_str = "Krad Vorbis Encoder: vorbis_analysis_blockout fail";
    printke (vorbis->state_str);
    return -1;
  }
  if (bo_ret == 1) {
    ret = vorbis_analysis (&vorbis->vblock, &op);
    if (ret < 0) {
      vorbis->error = ret;
      vorbis->state_str = "Krad Vorbis Encoder: vorbis_analysis fail";
      printke (vorbis->state_str);
      return -1;
    }
    //printk ("KR Vorbis Encoder: op gpos: %"PRIi64" size %ld",
    //        op.granulepos, op.bytes);
    codeme->sz = op.bytes;
    codeme->count = op.granulepos - vorbis->frames;
    vorbis->frames = op.granulepos;

    memcpy (codeme->data, op.packet, codeme->sz);

    //printk ("KR Vorbis Encoder: codeme size: %zu Count: %d",
    //        codeme->sz, codeme->count);
  }

  return bo_ret;
}
开发者ID:kripton,项目名称:krad_radio-1,代码行数:57,代码来源:krad_vorbis.c


示例5: krad_transmitter_transmission_transmit_header

int krad_transmitter_transmission_transmit_header (krad_transmission_t *krad_transmission,
											krad_transmission_receiver_t *krad_transmission_receiver) {

  int wrote;

  wrote = 0;

  while (krad_transmission_receiver->wrote_http_header == 0) {
	  wrote = write (krad_transmission_receiver->fd,
				   krad_transmission->http_header + krad_transmission_receiver->http_header_position,
				   krad_transmission->http_header_len - krad_transmission_receiver->http_header_position);

    if (wrote > 0) {
      krad_transmission_receiver->http_header_position += wrote;
	    if (krad_transmission_receiver->http_header_position == krad_transmission->http_header_len) {
		    krad_transmission_receiver->wrote_http_header = 1;
	    } else {
        return 0;
      }
    } else {
		  if (wrote == -1) {
			  if (errno != EAGAIN) {
				  printke ("Krad Transmitter: transmission error writing to socket");
				  krad_transmitter_receiver_destroy (krad_transmission_receiver);
			  }
      }
      return 0;
    }
  }

  while (krad_transmission_receiver->wrote_header == 0) {
	  wrote = write (krad_transmission_receiver->fd,
				   krad_transmission->header + krad_transmission_receiver->header_position,
				   krad_transmission->header_len - krad_transmission_receiver->header_position);

    if (wrote > 0) {
      krad_transmission_receiver->header_position += wrote;
	    if (krad_transmission_receiver->header_position == krad_transmission->header_len) {
		    krad_transmission_receiver->wrote_header = 1;
	    } else {
        return 0;
      }
    } else {
		  if (wrote == -1) {
			  if (errno != EAGAIN) {
				  printke ("Krad Transmitter: transmission error writing to socket");
				  krad_transmitter_receiver_destroy (krad_transmission_receiver);
			  }
      }
      return 0;
    }
  }

  krad_transmission_receiver->position = krad_transmission->sync_point;
  return 1;

}
开发者ID:bawNg,项目名称:krad_radio,代码行数:57,代码来源:krad_transmitter.c


示例6: krad_vpx_fail

static void krad_vpx_fail (vpx_codec_ctx_t *ctx, const char *s) {
    
    const char *detail = vpx_codec_error_detail(ctx);
    
    printke ("%s: %s\n", s, vpx_codec_error(ctx));

	if (detail) {
    	printke ("%s\n", detail);
	}

    failfast ("");
}
开发者ID:imclab,项目名称:krad_radio,代码行数:12,代码来源:krad_vpx.c


示例7: marlin_priv_cmd

int marlin_priv_cmd(struct net_device *ndev, struct ifreq *ifr)
{
	struct wlan_vif_t *vif;
	struct android_wifi_priv_cmd priv_cmd;
	char *command = NULL;
	u8 addr[ETH_ALEN] = {0};
	int bytes_written = 0;
	int ret = 0;

	vif =  ndev_to_vif(ndev);
	if (!ifr->ifr_data)
		return -EINVAL;
	if (copy_from_user(&priv_cmd, ifr->ifr_data,
			   sizeof(struct android_wifi_priv_cmd)))
		return -EFAULT;

	command = kmalloc(priv_cmd.total_len, GFP_KERNEL);
	if (!command) {
		printke("%s: Failed to allocate command!\n", __func__);
		return -ENOMEM;
	}
	if (copy_from_user(command, priv_cmd.buf, priv_cmd.total_len)) {
		ret = -EFAULT;
		goto exit;
	}

	if (strnicmp(command, CMD_BLACKLIST_ENABLE,
		     strlen(CMD_BLACKLIST_ENABLE)) == 0) {
		int skip = strlen(CMD_BLACKLIST_ENABLE) + 1;

		printke("%s, Received regular blacklist enable command\n",
			 __func__);
		sscanf(command + skip, "" MACSTR "", STR2MAC(addr));
		bytes_written = wlan_cmd_add_blacklist(vif, addr);
	} else if (strnicmp(command, CMD_BLACKLIST_DISABLE,
			    strlen(CMD_BLACKLIST_DISABLE)) == 0) {
		int skip = strlen(CMD_BLACKLIST_DISABLE) + 1;

		printke("%s, Received regular blacklist disable command\n",
			   __func__);
		sscanf(command + skip, "" MACSTR "", STR2MAC(addr));
		bytes_written = wlan_cmd_del_blacklist(vif, addr);
	}

	if (bytes_written < 0)
		ret = bytes_written;

exit:
	kfree(command);

	return ret;
}
开发者ID:ShinySide,项目名称:SM-G361H,代码行数:52,代码来源:wlan_core.c


示例8: wlan_rx_process

static int wlan_rx_process(unsigned char *buf, unsigned int max_len)
{
	static unsigned int cnt;
	static unsigned int skb;
	unsigned int p = 0;
	r_msg_hdr_t *msg = NULL;
	unsigned char vif_id;
	unsigned char *pData = NULL;
	unsigned short len;
	unsigned char event;
	if ((NULL == buf) || (0 == max_len)) {
		printke("[%s][ERROR]\n", __func__);
		return OK;
	}
	buf = buf + 8;
	msg = (r_msg_hdr_t *) (buf);
	max_len = max_len - 8;
	while (p < max_len) {

		vif_id = msg->mode;
		pData = (unsigned char *)(msg + 1);
		len = msg->len;

		if ((0xFF == msg->type) || (0xFF == msg->subtype))
			break;
		if (HOST_SC2331_PKT == msg->type) {
			pData = pData + msg->subtype;
			len = len - msg->subtype;
			wlan_rx_skb_process(vif_id, pData, len);
		} else if (HOST_SC2331_WAPI == msg->type) {
			wlan_rx_wapi_process(vif_id, pData, len);
		} else if (SC2331_HOST_RSP == msg->type) {
			wlan_rx_rsp_process(vif_id, msg);
		} else if (HOST_SC2331_CMD == msg->type) {
			event = msg->subtype;
			wlan_rx_event_process(vif_id, event, pData, len);
		} else {
			printke("[%s][RX DATA ERR]\n", __func__);
			break;
		}
		p = p + sizeof(t_msg_hdr_t) + ALIGN_4BYTE(msg->len);
		msg = (r_msg_hdr_t *) (buf + p);
		skb++;
	}
	cnt++;
	if (1000 == cnt) {
		printkd("r%d\n", skb);
		cnt = 0;
		skb = 0;
	}
	return OK;
}
开发者ID:ShinySide,项目名称:SM-G361H,代码行数:52,代码来源:wlan_core.c


示例9: kr_interweb_server_socket_setup

static int kr_interweb_server_socket_setup(char *interface, int port) {

    char port_string[6];
    struct addrinfo hints;
    struct addrinfo *result, *rp;
    int s;
    int sfd = 0;
    char *interface_actual;

    interface_actual = interface;

    printk ("Krad Interweb Server: interface: %s port %d", interface, port);
    snprintf (port_string, 6, "%d", port);
    memset (&hints, 0, sizeof (struct addrinfo));
    hints.ai_family = AF_UNSPEC;     /* Return IPv4 and IPv6 choices */
    hints.ai_socktype = SOCK_STREAM; /* We want a TCP socket */
    hints.ai_flags = AI_PASSIVE;     /* All interfaces */
    if ((strlen(interface) == 7) && (strncmp(interface, "0.0.0.0", 7) == 0)) {
        hints.ai_family = AF_INET;
        interface_actual = NULL;
    }
    if ((strlen(interface) == 4) && (strncmp(interface, "[::]", 4) == 0)) {
        hints.ai_family = AF_INET6;
        interface_actual = NULL;
    }
    s = getaddrinfo (interface_actual, port_string, &hints, &result);
    if (s != 0) {
        printke ("getaddrinfo: %s\n", gai_strerror (s));
        return -1;
    }
    for (rp = result; rp != NULL; rp = rp->ai_next) {
        sfd = socket (rp->ai_family, rp->ai_socktype, rp->ai_protocol);
        if (sfd == -1) {
            continue;
        }
        set_socket_reuseaddr(sfd);
        s = bind (sfd, rp->ai_addr, rp->ai_addrlen);
        if (s == 0) {
            /* We managed to bind successfully! */
            break;
        }
        close (sfd);
    }
    if (rp == NULL) {
        printke ("Could not bind %d\n", port);
        return -1;
    }
    freeaddrinfo (result);

    return sfd;
}
开发者ID:kripton,项目名称:krad_radio-1,代码行数:51,代码来源:socket.c


示例10: kr_mkv_parse_segment_header

static int kr_mkv_parse_segment_header (kr_mkv_t *mkv) {

  int ret;
  uint32_t id;
  uint64_t size;

  ret = kr_ebml2_unpack_id (mkv->e, &id, &size);
  if (ret < 0) {
    printke ("Read error...");
    return -1;
  }
  if (id != MKV_SEGMENT) {
    printke ("No Segment :/");
    return -1;
  }
  
  printk ("Got Segment");

  while (1) {
  
    ret = kr_ebml2_unpack_id (mkv->e, &id, &size);
    if (ret < 0) {
      printke ("Read error..");
      return -1;
    }

    switch (id) {
      case MKV_TRACKS:
        mkv->tracks_info_data = mkv->e->bufstart + mkv->e->pos;
        mkv->tracks_info_data_size = size;
        if (kr_mkv_parse_tracks (mkv, mkv->e->pos + size) < 0) {
          return -1;
        } else {
          return 0;
        }
      case MKV_SEGMENT_INFO:
        mkv->segment_info_data = mkv->e->bufstart + mkv->e->pos;
        mkv->segment_info_data_size = size;
        printk ("Got Segment Info: %"PRIu64" bytes", size);
        if (kr_mkv_parse_segment_info (mkv, mkv->e->pos + size) < 0) {
          return -1;
        }
        break;        
      default:
        printk ("Skipping unknown element: %"PRIu64" bytes", size);
        kr_ebml2_advance (mkv->e, size);
        break;
    }
  }
  return 0;
}
开发者ID:brooss,项目名称:krcam,代码行数:51,代码来源:krad_mkv_demux.c


示例11: krad_ipc_server_tcp_socket_create

int krad_ipc_server_tcp_socket_create (int port) {

	char port_string[6];
	struct addrinfo hints;
	struct addrinfo *result, *rp;
	int s;
	int sfd = 0;

	snprintf (port_string, 6, "%d", port);

	memset (&hints, 0, sizeof (struct addrinfo));
	hints.ai_family = AF_UNSPEC;     /* Return IPv4 and IPv6 choices */
	hints.ai_socktype = SOCK_STREAM; /* We want a TCP socket */
	hints.ai_flags = AI_PASSIVE;     /* All interfaces */

	s = getaddrinfo (NULL, port_string, &hints, &result);
	if (s != 0) {
		printke ("getaddrinfo: %s\n", gai_strerror (s));
		return -1;
	}

	for (rp = result; rp != NULL; rp = rp->ai_next) {
		
		sfd = socket (rp->ai_family, rp->ai_socktype, rp->ai_protocol);
		
		if (sfd == -1) {
			continue;
		}

		s = bind (sfd, rp->ai_addr, rp->ai_addrlen);
		
		if (s == 0) {
			/* We managed to bind successfully! */
			break;
		}

		close (sfd);
	}

	if (rp == NULL) {
		printke ("Could not bind %d\n", port);
		return -1;
	}

	freeaddrinfo (result);

	return sfd;
}
开发者ID:bawNg,项目名称:krad_radio,代码行数:48,代码来源:krad_ipc_server.c


示例12: hw_tx

static int hw_tx(const unsigned short chn, unsigned char *buf, unsigned int len)
{
	int ret;
	static unsigned int cnt;
	static unsigned int skb;
	tx_big_hdr_t *big_hdr;

	big_hdr = (tx_big_hdr_t *) buf;
	if ((PKT_AGGR_NUM < big_hdr->msg_num) || (0 == big_hdr->msg_num)) {
		ASSERT();
		return ERROR;
	}
	big_hdr->tx_cnt = g_wlan.hw.tx_cnt;
	printkp("[tx][%d][%d]\n", big_hdr->tx_cnt, chn);
	len = (len + 1023) & 0xFC00;
	wlan_tx_buf_decode(buf, len);
	ret = sdio_dev_write(chn, buf, len);
	if (0 != ret) {
		printke("call sdio_dev_write err:%d\n", ret);
		return HW_WRITE_ERROR;
	}
	skb = skb + big_hdr->msg_num;
	cnt++;
	if (1000 == cnt) {
		printkd("w%d\n", skb);
		cnt = 0;
		skb = 0;
	}
	g_wlan.hw.tx_cnt++;
	return OK;
}
开发者ID:ShinySide,项目名称:SM-G361H,代码行数:31,代码来源:wlan_core.c


示例13: kr_io2_output

int kr_io2_output(kr_io2_t *io) {

  ssize_t ret;

  if (!kr_io2_want_out(io)) {
    return 0;
  }
  ret = kr_io2_write(io);

  //printk("kr_io2_output wrote: %zu old len: %zu new len: %zu",
  //       ret, io->len, io->len - ret);


  if (ret != io->len) {
	  if (ret < 1) {
      	printke("its bad we should certainly fail, ret %zu len %zu",
         ret, io->len);
      	return ret;
	  } else {
	    io->len -= ret;
	    io->wr_buf += ret;		
	  }
	  return 0;
  }
  kr_io2_restart(io);
  return 0;
}
开发者ID:dsheeler,项目名称:krad_radio,代码行数:27,代码来源:krad_io2.c


示例14: krad_opus_decoder_write

int krad_opus_decoder_write (krad_opus_t *krad_opus,
                             uint8_t *buffer,
                             int length) {

  int i;
  int frames_decoded;

  frames_decoded = 0;

  krad_opus->opus_decoder_error = opus_multistream_decode_float (krad_opus->decoder,
                                  buffer,
                                  length,
                                  krad_opus->interleaved_samples,
                                  2880 * 2,
                                  0);

  if (krad_opus->opus_decoder_error < 0) {
    printke ("Krad Opus decoder error: %s\n",
              opus_strerror (krad_opus->opus_decoder_error));
  } else {
    frames_decoded = krad_opus->opus_decoder_error;
  }

  for (i = 0; i < frames_decoded; i++) {
    krad_opus->samples[0][i] = krad_opus->interleaved_samples[i * 2 + 0];
    krad_opus->samples[1][i] = krad_opus->interleaved_samples[i * 2 + 1];
  }

  krad_ringbuffer_write (krad_opus->ringbuf[0], (char *)krad_opus->samples[0], (frames_decoded * 4) );
  krad_ringbuffer_write (krad_opus->ringbuf[1], (char *)krad_opus->samples[1], (frames_decoded * 4) );

  return 0;
}
开发者ID:kripton,项目名称:krad_radio-1,代码行数:33,代码来源:krad_opus.c


示例15: calloc

kr_app_client *kr_app_connect(char *sysname, int timeout_ms) {
  kr_app_client *client;
  client = calloc(1, sizeof(kr_app_client));
  if (client == NULL) {
    failfast("Krad APP Client mem alloc fail");
    return NULL;
  }
  uname (&client->unixname);
  if (krad_valid_host_and_port (sysname)) {
    krad_get_host_and_port (sysname, client->host, &client->tcp_port);
  } else {
    strncpy (client->sysname, sysname, sizeof (client->sysname));
    if (strncmp(client->unixname.sysname, "Linux", 5) == 0) {
      client->on_linux = 1;
      client->api_path_pos = sprintf(client->api_path, "@krad_radio_%s_api", sysname);
    } else {
      client->api_path_pos = sprintf(client->api_path, "%s/krad_radio_%s_api", "/tmp", sysname);
    }
    if (!client->on_linux) {
      if(stat(client->api_path, &client->info) != 0) {
        kr_app_disconnect(client);
        failfast ("Krad APP Client: API PATH Failure\n");
        return NULL;
      }
    }
  }
  if (kr_app_client_init(client, timeout_ms) == 0) {
    printke ("Krad APP Client: Failed to init!");
    kr_app_disconnect(client);
    return NULL;
  }
  return client;
}
开发者ID:kripton,项目名称:krad_radio-1,代码行数:33,代码来源:krad_app_client.c


示例16: krad_decklink_cpp_detect_devices

int krad_decklink_cpp_detect_devices () {

	IDeckLinkIterator *deckLinkIterator;
	IDeckLink *deckLink;
	int device_count;
	//HRESULT result;
	
	device_count = 0;
	
	deckLinkIterator = CreateDeckLinkIteratorInstance();
	
	if (deckLinkIterator == NULL) {
		printke ("krad_decklink_detect_devices: The DeckLink drivers may not be installed.");
		return 0;
	}
	
	while (deckLinkIterator->Next(&deckLink) == S_OK) {

		device_count++;
		
		deckLink->Release();
	}
	
	deckLinkIterator->Release();
	
	return device_count;

}
开发者ID:bawNg,项目名称:krad_radio,代码行数:28,代码来源:krad_decklink_capture.cpp


示例17: krad_transmission_remove_ready

static void krad_transmission_remove_ready (krad_transmission_t *krad_transmission, krad_transmission_receiver_t *krad_transmission_receiver) {

    if (krad_transmission_receiver->ready != 1) {
        printke ("Krad Transmitter: receiver was not ready!");
        return;
    }

    krad_transmission_receiver->ready = 0;
    /*
    while (1) {
      if ((krad_transmission_receiver->prev == NULL) && (krad_transmission_receiver->next == NULL)) {
        krad_transmission->ready_receivers = NULL;
        break;
      }
      if ((krad_transmission_receiver->prev == NULL) && (krad_transmission_receiver->next != NULL)) {
        krad_transmission->ready_receivers = krad_transmission_receiver->next;
        krad_transmission_receiver->next->prev = NULL;
        break;
      }
      if ((krad_transmission_receiver->prev != NULL) && (krad_transmission_receiver->next == NULL)) {
        krad_transmission_receiver->prev->next = NULL;
        break;
      }
      if ((krad_transmission_receiver->prev != NULL) && (krad_transmission_receiver->next != NULL)) {
        krad_transmission_receiver->prev->next = krad_transmission_receiver->next;
        krad_transmission_receiver->next->prev = krad_transmission_receiver->prev;
        break;
      }
    }

    krad_transmission_receiver->prev = NULL;
    krad_transmission_receiver->next = NULL;
    */
    krad_transmission->ready_receiver_count--;
}
开发者ID:brooss,项目名称:krcam,代码行数:35,代码来源:krad_transmitter.c


示例18: wlan_hw_init

static int wlan_hw_init(hw_info_t *hw)
{
	struct device_node *np;

	memset(hw, 0, sizeof(hw_info_t));

	hw->sdio_tx_chn.num = 3;
	hw->sdio_tx_chn.chn[0] = 0;
	hw->sdio_tx_chn.chn[1] = 1;
	hw->sdio_tx_chn.chn[2] = 2;
	hw->sdio_tx_chn.bit_map = 0x0007;
	hw->sdio_tx_chn.timeout_time = 600;
	hw->sdio_tx_chn.timeout_flag = false;

	hw->sdio_rx_chn.num = 6;
	hw->sdio_rx_chn.chn[0] = 8;
	hw->sdio_rx_chn.chn[1] = 9;
	hw->sdio_rx_chn.chn[2] = 14;
	hw->sdio_rx_chn.chn[3] = 11;
	hw->sdio_rx_chn.chn[4] = 15;
	hw->sdio_rx_chn.chn[5] = 13;
	hw->sdio_rx_chn.bit_map = 0xeb00;
	hw->sdio_rx_chn.gpio_high = false;
	hw->sdio_rx_chn.timeout_time = 600;
	hw->sdio_rx_chn.timeout_flag = false;

	np = of_find_node_by_name(NULL, "sprd-marlin");
	if (!np) {
		printke("sprd-marlin not found");
		return -1;
	}
	hw->rx_gpio = of_get_gpio(np, 1);

	printke("[SDIO_TX_CHN][0x%x][0x%x]\n", hw->sdio_tx_chn.bit_map,
		HW_TX_SIZE);
	printke("[SDIO_RX_CHN][0x%x][0x%x]\n", hw->sdio_rx_chn.bit_map,
		HW_RX_SIZE);

	hw->wakeup = 0;
	spin_lock_init(&(hw->sdio_rx_chn.lock));
	wake_lock_init(&g_wlan.hw.wlan_lock, WAKE_LOCK_SUSPEND,
		       "wlan_sc2331_lock");
	init_timer(&g_wlan.hw.wakeup_timer);
	g_wlan.hw.wakeup_timer.function = wakeup_timer_func;
	g_wlan.hw.wakeup_time = 500;
	return OK;
}
开发者ID:ShinySide,项目名称:SM-G361H,代码行数:47,代码来源:wlan_core.c


示例19: krad_mixer_crossfade_group_create

void krad_mixer_crossfade_group_create (krad_mixer_t *krad_mixer, krad_mixer_portgroup_t *portgroup1, krad_mixer_portgroup_t *portgroup2) {

  int x;
  krad_mixer_crossfade_group_t *crossfade_group;

  if ((portgroup1 == NULL) || ((portgroup1->active != 1) && (portgroup1->active != 2)) ||
      (portgroup2 == NULL) || ((portgroup2->active != 1) && (portgroup2->active != 2))) {
    printke ("Invalid portgroup for crossfade!");
    return;
  }

  if (!(((portgroup1->direction == INPUT) || (portgroup1->direction == MIX)) &&
      ((portgroup1->direction == INPUT) || (portgroup2->direction == MIX)) &&
      (((portgroup1->io_type == MIXBUS) && (portgroup2->io_type == MIXBUS)) ||
       ((portgroup1->io_type != MIXBUS) && (portgroup2->io_type != MIXBUS))))) {
    printke ("Invalid crossfade group!");
    return;
  }
    
  if (portgroup1->crossfade_group != NULL) {
    krad_mixer_crossfade_group_destroy (krad_mixer, portgroup1->crossfade_group);
  }

  if (portgroup2->crossfade_group != NULL) {
    krad_mixer_crossfade_group_destroy (krad_mixer, portgroup2->crossfade_group);
  }

  for (x = 0; x < KRAD_MIXER_MAX_PORTGROUPS / 2; x++) {
    crossfade_group = &krad_mixer->crossfade_group[x];
    if ((crossfade_group != NULL) && ((crossfade_group->portgroup[0] == NULL) && (crossfade_group->portgroup[1] == NULL))) {
      break;
    }
  }

  crossfade_group->portgroup[0] = portgroup1;
  crossfade_group->portgroup[1] = portgroup2;
  
  portgroup1->crossfade_group = crossfade_group;
  portgroup2->crossfade_group = crossfade_group;

  krad_radio_broadcast_subunit_update ( krad_mixer->krad_ipc->ipc_broadcaster, &portgroup1->address, KR_CROSSFADE_GROUP, 
                                        KR_STRING, portgroup2->sysname, NULL );

  krad_mixer_set_portgroup_control (krad_mixer, portgroup1->sysname, "crossfade", -100.0f, 0, NULL );
}
开发者ID:imclab,项目名称:krad_radio,代码行数:45,代码来源:krad_mixer.c


示例20: krad_control_init

int krad_control_init (krad_control_t *krad_control) {
  if (socketpair(AF_UNIX, SOCK_STREAM, 0, krad_control->sockets)) {
    printke ("Krad System: can't socketpair errno: %d", errno);
    krad_control->sockets[0] = 0;
    krad_control->sockets[1] = 0;
    return -1;
  }
  return 0;
}
开发者ID:brooss,项目名称:krcam,代码行数:9,代码来源:krad_system.c



注:本文中的printke函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ printline函数代码示例发布时间:2022-05-30
下一篇:
C++ printk_ratelimited函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap