本文整理汇总了C++中os_memmove函数的典型用法代码示例。如果您正苦于以下问题:C++ os_memmove函数的具体用法?C++ os_memmove怎么用?C++ os_memmove使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了os_memmove函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: p2p_channels_remove_freqs
void p2p_channels_remove_freqs(struct p2p_channels *chan,
const struct wpa_freq_range_list *list)
{
size_t o, c;
if (list == NULL)
return;
o = 0;
while (o < chan->reg_classes) {
struct p2p_reg_class *op = &chan->reg_class[o];
c = 0;
while (c < op->channels) {
int freq = p2p_channel_to_freq(op->reg_class,
op->channel[c]);
if (freq > 0 && freq_range_list_includes(list, freq)) {
op->channels--;
os_memmove(&op->channel[c],
&op->channel[c + 1],
op->channels - c);
} else
c++;
}
if (op->channels == 0) {
chan->reg_classes--;
os_memmove(&chan->reg_class[o], &chan->reg_class[o + 1],
(chan->reg_classes - o) *
sizeof(struct p2p_reg_class));
} else
o++;
}
}
开发者ID:PDi-Communication-Systems-Inc,项目名称:lollipop_external_wpa_supplicant_8,代码行数:34,代码来源:p2p_utils.c
示例2: btchip_decode_base58
unsigned char btchip_decode_base58(unsigned char WIDE *in, unsigned char length,
unsigned char *out,
unsigned char maxoutlen) {
unsigned char tmp[164];
unsigned char buffer[164];
unsigned char i;
unsigned char j;
unsigned char startAt;
unsigned char zeroCount = 0;
if (length > sizeof(tmp)) {
THROW(INVALID_PARAMETER);
}
os_memmove(tmp, in, length);
L_DEBUG_BUF(("To decode\n", tmp, length));
for (i = 0; i < length; i++) {
if (in[i] > 128) {
THROW(EXCEPTION);
}
tmp[i] = BASE58TABLE[in[i]];
if (tmp[i] == 0xff) {
THROW(EXCEPTION);
}
}
while ((zeroCount < length) && (tmp[zeroCount] == 0)) {
++zeroCount;
}
j = length;
startAt = zeroCount;
while (startAt < length) {
unsigned short remainder = 0;
unsigned char divLoop;
for (divLoop = startAt; divLoop < length; divLoop++) {
unsigned short digit256 = (unsigned short)(tmp[divLoop] & 0xff);
unsigned short tmpDiv = remainder * 58 + digit256;
tmp[divLoop] = (unsigned char)(tmpDiv / 256);
remainder = (tmpDiv % 256);
}
if (tmp[startAt] == 0) {
++startAt;
}
buffer[--j] = (unsigned char)remainder;
}
while ((j < length) && (buffer[j] == 0)) {
++j;
}
length = length - (j - zeroCount);
if (maxoutlen < length) {
L_DEBUG_APP(("Decode overflow %d %d\n", length, maxoutlen));
THROW(EXCEPTION_OVERFLOW);
}
os_memmove(out, buffer + j - zeroCount, length);
L_DEBUG_BUF(("Decoded\n", out, length));
return length;
}
开发者ID:truekyleo,项目名称:blue-app-btc,代码行数:54,代码来源:btchip_base58.c
示例3: btchip_encode_base58
unsigned char btchip_encode_base58(unsigned char WIDE *in, unsigned char length,
unsigned char *out,
unsigned char maxoutlen) {
unsigned char tmp[164];
unsigned char buffer[164];
unsigned char j;
unsigned char startAt;
unsigned char zeroCount = 0;
if (length > sizeof(tmp)) {
THROW(INVALID_PARAMETER);
}
os_memmove(tmp, in, length);
L_DEBUG_APP(("Length to encode %d\n", length));
L_DEBUG_BUF(("To encode\n", tmp, length));
while ((zeroCount < length) && (tmp[zeroCount] == 0)) {
++zeroCount;
}
j = 2 * length;
startAt = zeroCount;
while (startAt < length) {
unsigned short remainder = 0;
unsigned char divLoop;
for (divLoop = startAt; divLoop < length; divLoop++) {
unsigned short digit256 = (unsigned short)(tmp[divLoop] & 0xff);
unsigned short tmpDiv = remainder * 256 + digit256;
tmp[divLoop] = (unsigned char)(tmpDiv / 58);
remainder = (tmpDiv % 58);
}
if (tmp[startAt] == 0) {
++startAt;
}
buffer[--j] = (unsigned char)BASE58ALPHABET[remainder];
}
while ((j < (2 * length)) && (buffer[j] == BASE58ALPHABET[0])) {
++j;
}
while (zeroCount-- > 0) {
buffer[--j] = BASE58ALPHABET[0];
}
length = 2 * length - j;
if (maxoutlen < length) {
L_DEBUG_APP(("Encode overflow %d %d\n", length, maxoutlen));
THROW(EXCEPTION_OVERFLOW);
}
os_memmove(out, (buffer + j), length);
L_DEBUG_APP(("Length encoded %d\n", length));
L_DEBUG_BUF(("Encoded\n", out, length));
return length;
}
开发者ID:truekyleo,项目名称:blue-app-btc,代码行数:49,代码来源:btchip_base58.c
示例4: eloop_sock_table_remove_sock
static void eloop_sock_table_remove_sock(struct eloop_sock_table *table,
int sock)
{
int i;
if (table == NULL || table->table == NULL || table->count == 0)
return;
for (i = 0; i < table->count; i++) {
if (table->table[i].sock == sock)
break;
}
if (i == table->count)
return;
eloop_trace_sock_remove_ref(table);
if (i != table->count - 1) {
os_memmove(&table->table[i], &table->table[i + 1],
(table->count - i - 1) *
sizeof(struct eloop_sock));
}
table->count--;
eloop.count--;
table->changed = 1;
eloop_trace_sock_add_ref(table);
}
开发者ID:Anuriel,项目名称:wpasupplicant,代码行数:25,代码来源:eloop.c
示例5: encrypt_pw_block_with_password_hash
/**
* encrypt_pw_block_with_password_hash - EncryptPwBlockWithPasswordHash() - RFC 2759, Sect. 8.10
* @password: 0-to-256-unicode-char Password (IN; UTF-8)
* @password_len: Length of password
* @password_hash: 16-octet PasswordHash (IN)
* @pw_block: 516-byte PwBlock (OUT)
* Returns: 0 on success, -1 on failure
*/
int encrypt_pw_block_with_password_hash(
const u8 *password, size_t password_len,
const u8 *password_hash, u8 *pw_block)
{
size_t ucs2_len, offset;
u8 *pos;
os_memset(pw_block, 0, PWBLOCK_LEN);
if (utf8_to_ucs2(password, password_len, pw_block, 512, &ucs2_len) < 0)
return -1;
if (ucs2_len > 256)
return -1;
offset = (256 - ucs2_len) * 2;
if (offset != 0) {
os_memmove(pw_block + offset, pw_block, ucs2_len * 2);
if (os_get_random(pw_block, offset) < 0)
return -1;
}
/*
* PasswordLength is 4 octets, but since the maximum password length is
* 256, only first two (in little endian byte order) can be non-zero.
*/
pos = &pw_block[2 * 256];
WPA_PUT_LE16(pos, password_len * 2);
rc4_skip(password_hash, 16, 0, pw_block, PWBLOCK_LEN);
return 0;
}
开发者ID:Adrellias,项目名称:mana,代码行数:38,代码来源:ms_funcs.c
示例6: eloop_unregister_read_sock
void eloop_unregister_read_sock(int sock)
{
size_t i;
if (eloop.readers == NULL || eloop.reader_count == 0)
return;
for (i = 0; i < eloop.reader_count; i++) {
if (eloop.readers[i].sock == sock)
break;
}
if (i == eloop.reader_count)
return;
WSAEventSelect(eloop.readers[i].sock, eloop.readers[i].event, 0);
WSACloseEvent(eloop.readers[i].event);
if (i != eloop.reader_count - 1) {
os_memmove(&eloop.readers[i], &eloop.readers[i + 1],
(eloop.reader_count - i - 1) *
sizeof(struct eloop_sock));
}
eloop.reader_count--;
eloop.reader_table_changed = 1;
}
开发者ID:Alkzndr,项目名称:freebsd,代码行数:25,代码来源:eloop_win.c
示例7: pkcs1_v15_private_key_decrypt
int pkcs1_v15_private_key_decrypt(struct crypto_rsa_key *key,
const u8 *in, size_t inlen,
u8 *out, size_t *outlen)
{
int res;
u8 *pos, *end;
res = crypto_rsa_exptmod(in, inlen, out, outlen, key, 1);
if (res)
return res;
if (*outlen < 2 || out[0] != 0 || out[1] != 2)
return -1;
/* Skip PS (pseudorandom non-zero octets) */
pos = out + 2;
end = out + *outlen;
while (*pos && pos < end)
pos++;
if (pos == end)
return -1;
pos++;
*outlen -= pos - out;
/* Strip PKCS #1 header */
os_memmove(out, pos, *outlen);
return 0;
}
开发者ID:0x000000FF,项目名称:wpa_supplicant_for_edison,代码行数:30,代码来源:pkcs1.c
示例8: TMap_Remove
//! removes an Entry from map...
void TMap_Remove(TMap * me, void * key)
{
void * foundElem;
BYTE * pToKey;
int iPos;
int memsize;
foundElem = TMap_Find(me, key);
if (!foundElem) return; //???? not in map!!!
//one less
me->curCountElements--;
//pointer to key is sizelenkey before...
pToKey = ((BYTE*)foundElem) - me->size_Of_Key;
//calc the current position
iPos = (pToKey - me->mapfield) / (me->size_Of_Key+ me->size_Of_Value);
memsize = (me->curCountElements - iPos) * (me->size_Of_Key+ me->size_Of_Value);
//copy all memory above to the current pos...
os_memmove(pToKey,
pToKey + me->size_Of_Key + me->size_Of_Value,
memsize
);
}
开发者ID:pi2p,项目名称:libyasdi,代码行数:28,代码来源:minmap.c
示例9: eloop_sock_table_remove_sock
static void eloop_sock_table_remove_sock(struct eloop_sock_table *table,
int sock)
{
int i;
if (table == NULL || table->table == NULL || table->count == 0)
return;
for (i = 0; i < table->count; i++) {
if (table->table[i].sock == sock)
break;
}
if (i == table->count)
return;
eloop_trace_sock_remove_ref(table);
if (i != table->count - 1) {
os_memmove(&table->table[i], &table->table[i + 1],
(table->count - i - 1) *
sizeof(struct eloop_sock));
}
table->count--;
eloop.count--;
#ifndef CONFIG_ELOOP_EPOLL
table->changed = 1;
#endif /* CONFIG_ELOOP_EPOLL */
eloop_trace_sock_add_ref(table);
#ifdef CONFIG_ELOOP_EPOLL
if (epoll_ctl(eloop.epollfd, EPOLL_CTL_DEL, sock, NULL) < 0) {
wpa_printf(MSG_ERROR, "%s: epoll_ctl(DEL) for fd=%d "
"failed. %s\n", __func__, sock, strerror(errno));
return;
}
os_memset(&eloop.epoll_table[sock], 0, sizeof(struct eloop_sock));
#endif /* CONFIG_ELOOP_EPOLL */
}
开发者ID:asb,项目名称:frankenlibc,代码行数:35,代码来源:eloop.c
示例10: wpa_bss_remove
static void wpa_bss_remove(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
const char *reason)
{
if (wpa_s->last_scan_res) {
unsigned int i;
for (i = 0; i < wpa_s->last_scan_res_used; i++) {
if (wpa_s->last_scan_res[i] == bss) {
os_memmove(&wpa_s->last_scan_res[i],
&wpa_s->last_scan_res[i + 1],
(wpa_s->last_scan_res_used - i - 1)
* sizeof(struct wpa_bss *));
wpa_s->last_scan_res_used--;
break;
}
}
}
wpa_bss_update_pending_connect(wpa_s, bss, NULL);
dl_list_del(&bss->list);
dl_list_del(&bss->list_id);
wpa_s->num_bss--;
wpa_dbg(wpa_s, MSG_DEBUG, "BSS: Remove id %u BSSID " MACSTR
" SSID '%s' due to %s", bss->id, MAC2STR(bss->bssid),
wpa_ssid_txt(bss->ssid, bss->ssid_len), reason);
wpas_notify_bss_removed(wpa_s, bss->bssid, bss->id);
wpa_bss_anqp_free(bss->anqp);
os_free(bss);
}
开发者ID:fengcc,项目名称:chameleon,代码行数:27,代码来源:bss.c
示例11: eap_fast_derive_key
u8 * eap_fast_derive_key(void *ssl_ctx, struct tls_connection *conn,
const char *label, size_t len)
{
struct tls_keys keys;
u8 *rnd = NULL, *out;
int block_size;
block_size = tls_connection_get_keyblock_size(ssl_ctx, conn);
if (block_size < 0)
return NULL;
out = os_malloc(block_size + len);
if (out == NULL)
return NULL;
if (tls_connection_prf(ssl_ctx, conn, label, 1, out, block_size + len)
== 0) {
os_memmove(out, out + block_size, len);
return out;
}
if (tls_connection_get_keys(ssl_ctx, conn, &keys))
goto fail;
rnd = os_malloc(keys.client_random_len + keys.server_random_len);
if (rnd == NULL)
goto fail;
os_memcpy(rnd, keys.server_random, keys.server_random_len);
os_memcpy(rnd + keys.server_random_len, keys.client_random,
keys.client_random_len);
wpa_hexdump_key(MSG_MSGDUMP, "EAP-FAST: master_secret for key "
"expansion", keys.master_key, keys.master_key_len);
if (tls_prf(keys.master_key, keys.master_key_len,
label, rnd, keys.client_random_len +
keys.server_random_len, out, block_size + len))
goto fail;
os_free(rnd);
os_memmove(out, out + block_size, len);
return out;
fail:
os_free(rnd);
os_free(out);
return NULL;
}
开发者ID:MultiNet-80211,项目名称:Hostapd,代码行数:47,代码来源:eap_fast_common.c
示例12: microrl_backspace
//*****************************************************************************
// remove one char at cursor
static void ICACHE_FLASH_ATTR microrl_backspace (microrl_t * pThis)
{
if (pThis->cursor > 0) {
terminal_backspace (pThis);
os_memmove (pThis->cmdline + pThis->cursor-1,
pThis->cmdline + pThis->cursor,
pThis->cmdlen-pThis->cursor+1);
pThis->cursor--;
pThis->cmdline [pThis->cmdlen] = '\0';
pThis->cmdlen--;
}
}
开发者ID:Squonk42,项目名称:nodelua,代码行数:14,代码来源:microrl.c
示例13: eap_sm_process_nak
/**
* eap_sm_process_nak - Process EAP-Response/Nak
* @sm: Pointer to EAP state machine allocated with eap_server_sm_init()
* @nak_list: Nak list (allowed methods) from the supplicant
* @len: Length of nak_list in bytes
*
* This function is called when EAP-Response/Nak is received from the
* supplicant. This can happen for both phase 1 and phase 2 authentications.
*/
void eap_sm_process_nak(struct eap_sm *sm, const u8 *nak_list, size_t len)
{
int i;
size_t j;
if (sm->user == NULL)
return;
wpa_printf(MSG_MSGDUMP, "EAP: processing NAK (current EAP method "
"index %d)", sm->user_eap_method_index);
wpa_hexdump(MSG_MSGDUMP, "EAP: configured methods",
(u8 *) sm->user->methods,
EAP_MAX_METHODS * sizeof(sm->user->methods[0]));
wpa_hexdump(MSG_MSGDUMP, "EAP: list of methods supported by the peer",
nak_list, len);
i = sm->user_eap_method_index;
while (i < EAP_MAX_METHODS &&
(sm->user->methods[i].vendor != EAP_VENDOR_IETF ||
sm->user->methods[i].method != EAP_TYPE_NONE)) {
if (sm->user->methods[i].vendor != EAP_VENDOR_IETF)
goto not_found;
for (j = 0; j < len; j++) {
if (nak_list[j] == sm->user->methods[i].method) {
break;
}
}
if (j < len) {
/* found */
i++;
continue;
}
not_found:
/* not found - remove from the list */
if (i + 1 < EAP_MAX_METHODS) {
os_memmove(&sm->user->methods[i],
&sm->user->methods[i + 1],
(EAP_MAX_METHODS - i - 1) *
sizeof(sm->user->methods[0]));
}
sm->user->methods[EAP_MAX_METHODS - 1].vendor =
EAP_VENDOR_IETF;
sm->user->methods[EAP_MAX_METHODS - 1].method = EAP_TYPE_NONE;
}
wpa_hexdump(MSG_MSGDUMP, "EAP: new list of configured methods",
(u8 *) sm->user->methods, EAP_MAX_METHODS *
sizeof(sm->user->methods[0]));
}
开发者ID:wufuyue,项目名称:TCL_S820,代码行数:61,代码来源:eap_server.c
示例14: eap_eke_shared_secret
int eap_eke_shared_secret(struct eap_eke_session *sess, const u8 *key,
const u8 *dhpriv, const u8 *peer_dhcomp)
{
u8 zeros[EAP_EKE_MAX_HASH_LEN];
u8 peer_pub[EAP_EKE_MAX_DH_LEN];
u8 modexp[EAP_EKE_MAX_DH_LEN];
size_t len;
const struct dh_group *dh;
dh = eap_eke_dh_group(sess->dhgroup);
if (sess->encr != EAP_EKE_ENCR_AES128_CBC || !dh)
return -1;
/* Decrypt peer DHComponent */
os_memcpy(peer_pub, peer_dhcomp + AES_BLOCK_SIZE, dh->prime_len);
if (aes_128_cbc_decrypt(key, peer_dhcomp, peer_pub, dh->prime_len) < 0) {
wpa_printf(MSG_INFO, "EAP-EKE: Failed to decrypt DHComponent");
return -1;
}
wpa_hexdump_key(MSG_DEBUG, "EAP-EKE: Decrypted peer DH pubkey",
peer_pub, dh->prime_len);
/* SharedSecret = prf(0+, g ^ (x_s * x_p) (mod p)) */
len = dh->prime_len;
if (crypto_dh_derive_secret(*dh->generator, dh->prime, dh->prime_len,
NULL, 0, dhpriv, dh->prime_len, peer_pub,
dh->prime_len, modexp, &len) < 0)
return -1;
if (len < dh->prime_len) {
size_t pad = dh->prime_len - len;
os_memmove(modexp + pad, modexp, len);
os_memset(modexp, 0, pad);
}
os_memset(zeros, 0, sess->auth_len);
if (eap_eke_prf(sess->prf, zeros, sess->auth_len, modexp, dh->prime_len,
NULL, 0, sess->shared_secret) < 0)
return -1;
wpa_hexdump_key(MSG_DEBUG, "EAP-EKE: SharedSecret",
sess->shared_secret, sess->auth_len);
return 0;
}
开发者ID:FreeBSDFoundation,项目名称:freebsd,代码行数:43,代码来源:eap_eke_common.c
示例15: microrl_insert_text
//*****************************************************************************
// insert len char of text at cursor position
static int ICACHE_FLASH_ATTR microrl_insert_text (microrl_t * pThis, char * text, int len)
{
int i;
if (pThis->cmdlen + len < _COMMAND_LINE_LEN) {
os_memmove (pThis->cmdline + pThis->cursor + len,
pThis->cmdline + pThis->cursor,
pThis->cmdlen - pThis->cursor);
for (i = 0; i < len; i++) {
pThis->cmdline [pThis->cursor + i] = text [i];
// if (pThis->cmdline [pThis->cursor + i] == ' ') {
// pThis->cmdline [pThis->cursor + i] = 0;
// }
}
pThis->cursor += len;
pThis->cmdlen += len;
pThis->cmdline [pThis->cmdlen] = '\0';
return true;
}
return false;
}
开发者ID:Squonk42,项目名称:nodelua,代码行数:22,代码来源:microrl.c
示例16: platform_s_flash_read
/*
* Assumptions:
* > fromaddr is INTERNAL_FLASH_READ_UNIT_SIZE aligned
* > size is a multiple of INTERNAL_FLASH_READ_UNIT_SIZE
*/
uint32_t platform_s_flash_read( void *to, uint32_t fromaddr, uint32_t size )
{
if (size==0)
return 0;
SpiFlashOpResult r;
system_soft_wdt_feed ();
const uint32_t blkmask = (INTERNAL_FLASH_READ_UNIT_SIZE - 1);
if( ((uint32_t)to) & blkmask )
{
uint32_t size2=size-INTERNAL_FLASH_READ_UNIT_SIZE;
uint32* to2=(uint32*)((((uint32_t)to)&(~blkmask))+INTERNAL_FLASH_READ_UNIT_SIZE);
r = flash_read(fromaddr, to2, size2);
if(SPI_FLASH_RESULT_OK == r)
{
os_memmove(to,to2,size2);
char back[ INTERNAL_FLASH_READ_UNIT_SIZE ] __attribute__ ((aligned(INTERNAL_FLASH_READ_UNIT_SIZE)));
r=flash_read(fromaddr+size2,(uint32*)back,INTERNAL_FLASH_READ_UNIT_SIZE);
os_memcpy((uint8_t*)to+size2,back,INTERNAL_FLASH_READ_UNIT_SIZE);
}
开发者ID:nodemcu,项目名称:nodemcu-firmware,代码行数:26,代码来源:platform.c
示例17: wpa_config_add_prio_network
/**
* wpa_config_add_prio_network - Add a network to priority lists
* @config: Configuration data from wpa_config_read()
* @ssid: Pointer to the network configuration to be added to the list
* Returns: 0 on success, -1 on failure
*
* This function is used to add a network block to the priority list of
* networks. This must be called for each network when reading in the full
* configuration. In addition, this can be used indirectly when updating
* priorities by calling wpa_config_update_prio_list().
*/
int wpa_config_add_prio_network(struct wpa_config *config,
struct wpa_ssid *ssid)
{
int prio;
struct wpa_ssid *prev, **nlist;
/*
* Add to an existing priority list if one is available for the
* configured priority level for this network.
*/
for (prio = 0; prio < config->num_prio; prio++) {
prev = config->pssid[prio];
if (prev->priority == ssid->priority) {
while (prev->pnext)
prev = prev->pnext;
prev->pnext = ssid;
return 0;
}
}
/* First network for this priority - add a new priority list */
nlist = os_realloc(config->pssid,
(config->num_prio + 1) * sizeof(struct wpa_ssid *));
if (nlist == NULL)
return -1;
for (prio = 0; prio < config->num_prio; prio++) {
if (nlist[prio]->priority < ssid->priority)
break;
}
os_memmove(&nlist[prio + 1], &nlist[prio],
(config->num_prio - prio) * sizeof(struct wpa_ssid *));
nlist[prio] = ssid;
config->num_prio++;
config->pssid = nlist;
return 0;
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:51,代码来源:config.c
示例18: url_decode
ICACHE_FLASH_ATTR void url_decode(char *s) {
size_t l, i;
char *p;
uint8_t f;
l = os_strlen(s) + 1;
while (1) {
f = 0;
for (i=0; i<MAP_LEN; i++) {
if ((p = strstr(s, map[i][0])) != NULL) {
*p = map[i][1][0];
os_memmove(p+1, p+3, l - ((p+3)-s));
l -= 2;
f = 1;
}
}
if (f == 0)
break;
}
}
开发者ID:jo-makar,项目名称:esp8266-toolbox,代码行数:22,代码来源:utils.c
示例19: eloop_unregister_event
void eloop_unregister_event(void *event, size_t event_size)
{
size_t i;
HANDLE h = event;
if (eloop.events == NULL || eloop.event_count == 0 ||
event_size != sizeof(HANDLE))
return;
for (i = 0; i < eloop.event_count; i++) {
if (eloop.events[i].event == h)
break;
}
if (i == eloop.event_count)
return;
if (i != eloop.event_count - 1) {
os_memmove(&eloop.events[i], &eloop.events[i + 1],
(eloop.event_count - i - 1) *
sizeof(struct eloop_event));
}
eloop.event_count--;
}
开发者ID:Alkzndr,项目名称:freebsd,代码行数:23,代码来源:eloop_win.c
示例20: u2f_io_send
void u2f_io_send(uint8_t *buffer, uint16_t length,
u2f_transport_media_t media) {
if (media == U2F_MEDIA_USB) {
os_memset(u2fSegment, 0, sizeof(u2fSegment));
}
os_memmove(u2fSegment, buffer, length);
// PRINTF("u2f_io_send\n");
if (u2fFirstCommand) {
u2fFirstCommand = 0;
}
switch (media) {
case U2F_MEDIA_USB:
io_usb_send_apdu_data(u2fSegment, USB_SEGMENT_SIZE);
break;
#ifdef HAVE_BLE
case U2F_MEDIA_BLE:
BLE_protocol_send(buffer, length);
break;
#endif
default:
PRINTF("Request to send on unsupported media %d\n", media);
break;
}
}
开发者ID:truekyleo,项目名称:blue-app-btc,代码行数:24,代码来源:u2f_io.c
注:本文中的os_memmove函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论