这四天全部都在debug flash 1bit 切换到4bit :原理:step1:把写好的C程序编译为HEX文件,我用的是GCC编译器 step2:用readmemh把HEX文件store到flash的仿真模型 step3:active tcm 功能(设定了TCM的搬移起始地址(Flash的)和搬...
分类:
其他好文 时间:
2014-10-16 20:13:03
阅读次数:
298
/// /// 从16进制转换成汉字 /// /// /// 编码,如"utf-8","gb2312" /// public string HexToStr(string hex, string charset) { if (hex =...
分类:
其他好文 时间:
2014-10-15 00:17:19
阅读次数:
247
#include <iostream> #include <sstream> int main() { int i = 123; std::string temp; std::stringstream ss; ss << std::hex << i; ss >> temp; std::cout << temp << std::endl; return 0; }...
分类:
编程语言 时间:
2014-10-13 14:26:09
阅读次数:
211
一、数学函数ABS( x ) 返回x的绝对值BIN( x ) 返回x的二进制(OCT返回八进制,HEX返回十六进制)CEILING( x ) 返回大于x的最小整数值EXP( x ) 返回值...
分类:
数据库 时间:
2014-10-10 23:53:34
阅读次数:
374
int BetterVenca25(char* hex){ int res=0; for(;*hex;hex++) { int d=toupper(*hex); if(d >='0' && d ='A' && d <='F')d-='A'-10; else return -1; res=res*16...
分类:
编程语言 时间:
2014-10-09 14:40:43
阅读次数:
231
#include #include int main() { unsigned int x; std::stringstream ss; ss > x; // output it as a signed type std::cout (x) << std::end...
分类:
其他好文 时间:
2014-10-09 14:17:23
阅读次数:
201
在剖析该问题前请看如下代码Java代码publicstaticStringbytes2HexString(byte[]b){Stringret="";for(inti=0;i<b.length;i++){Stringhex=Integer.toHexString(b[i]&0xFF);if(hex....
分类:
编程语言 时间:
2014-10-08 18:11:05
阅读次数:
216
提供两个函数,方便十六进制串与ASCII 字符串之间的相互转换,使用函数需要注意的是返回的串是在堆上通过 calloc 分配的,所以,记得使用完返回值释放该块,并且将指向该块的指针 =NULL 。char *chstohex ( char* chs ){ char hex[16] = { '0...
分类:
其他好文 时间:
2014-10-05 23:45:59
阅读次数:
231
OpenStack icehource for Ubuntu OS1,网络规划2,Ntp apt-get install ntp3,generate secure passwdapt-get install pwgen or openssl rand -hex 104,deployment auto...
分类:
其他好文 时间:
2014-09-30 18:46:50
阅读次数:
286
1、不需要参数的IO控制器的函数定义在中,其中包括dec,oct和hex.也包括ws,endl,ends和flush以及如下图所示的内容。 2、需要参数的控制器定义在头文件中,有如下的预定义的控制器 3、下边是使用IO控制器的例子程序 1: #include 2: #include 3: using...
分类:
编程语言 时间:
2014-09-28 23:07:35
阅读次数:
359