代码拉取完成,页面将自动刷新
同步操作将从 FreeAC/FreeAC 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 版权所有 2014-2015 成都星锐蓝海网络科技有限公司
* 商业许可请联系 +86-18682011860 QQ:66442834
*
*/
#ifndef __XYZ_HEX_H__
#define __XYZ_HEX_H__
#include "xyz_int.h"
static const unsigned char S_xyz_hex[] = "0123456789abcdef";
static const unsigned char S_xyz_HEX[] = "0123456789ABCDEF";
static inline void xyz_hex_u8_upper(xyz_u8_t n, xyz_u8_t *buf)
{
buf[0] = S_xyz_HEX[(n >> 4) & 0xF];
buf[1] = S_xyz_HEX[n & 0xF];
}
static inline void xyz_hex_u8_lower(xyz_u8_t n, xyz_u8_t *buf)
{
buf[0] = S_xyz_hex[(n >> 4) & 0xF];
buf[1] = S_xyz_hex[n & 0xF];
}
static inline void xyz_hex_u16_upper(xyz_u16_t n, xyz_u8_t *buf)
{
buf[0] = S_xyz_HEX[(n >> 12) & 0xF];
buf[1] = S_xyz_HEX[(n >> 8) & 0xF];
buf[2] = S_xyz_HEX[(n >> 4) & 0xF];
buf[3] = S_xyz_HEX[n & 0xF];
}
static inline void xyz_hex_u16_lower(xyz_u16_t n, xyz_u8_t *buf)
{
buf[0] = S_xyz_hex[(n >> 12) & 0xF];
buf[1] = S_xyz_hex[(n >> 8) & 0xF];
buf[2] = S_xyz_hex[(n >> 4) & 0xF];
buf[3] = S_xyz_hex[n & 0xF];
}
static inline void xyz_hex_u32_upper(xyz_u32_t n, xyz_u8_t *buf)
{
buf[0] = S_xyz_HEX[(n >> 28) & 0xF];
buf[1] = S_xyz_HEX[(n >> 24) & 0xF];
buf[2] = S_xyz_HEX[(n >> 20) & 0xF];
buf[3] = S_xyz_HEX[(n >> 16) & 0xF];
buf[4] = S_xyz_HEX[(n >> 12) & 0xF];
buf[5] = S_xyz_HEX[(n >> 8) & 0xF];
buf[6] = S_xyz_HEX[(n >> 4) & 0xF];
buf[7] = S_xyz_HEX[n & 0xF];
}
static inline void xyz_hex_u32_lower(xyz_u32_t n, xyz_u8_t *buf)
{
buf[0] = S_xyz_hex[(n >> 28) & 0xF];
buf[1] = S_xyz_hex[(n >> 24) & 0xF];
buf[2] = S_xyz_hex[(n >> 20) & 0xF];
buf[3] = S_xyz_hex[(n >> 16) & 0xF];
buf[4] = S_xyz_hex[(n >> 12) & 0xF];
buf[5] = S_xyz_hex[(n >> 8) & 0xF];
buf[6] = S_xyz_hex[(n >> 4) & 0xF];
buf[7] = S_xyz_hex[n & 0xF];
}
int xyz_hex_byte_upper(const xyz_u8_t *b, xyz_sli_t len, xyz_u8_t *buf, xyz_sli_t size);
int xyz_hex_byte_lower(const xyz_u8_t *b, xyz_sli_t len, xyz_u8_t *buf, xyz_sli_t size);
xyz_u8_t xyz_hex_digit(xyz_u8_t ch);
xyz_u64_t xyz_hex_str_int(const xyz_u8_t *s, xyz_sli_t len);
static inline xyz_sli_t xyz_hex_str_byte_size(xyz_sli_t len)
{
return ((len % 2) ? ((len + 1) / 2) : (len / 2));
}
int xyz_hex_str_byte(const xyz_u8_t *s, xyz_sli_t len, xyz_u8_t *buf, xyz_sli_t size);
int xyz_hex_MAC_str_byte(const xyz_u8_t *s, xyz_sli_t len, xyz_u8_t *buf, xyz_sli_t size);
int xyz_hex_MAC_byte_upper(const xyz_u8_t *in, xyz_sli_t len, xyz_u8_t *out, xyz_sli_t size);
int xyz_hex_MAC_byte_lower(const xyz_u8_t *in, xyz_sli_t len, xyz_u8_t *out, xyz_sli_t size);
#endif /* __XYZ_HEX_H__ */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。