2011年5月27日
摘要: #include <stdio.h>#include <time.h>#define HEX2BCD(x) (((x) % 10) + ((((x) / 10) % 10) << 4)) /*20 -> 20H*/#define UINT8 unsigned char/* 功能:获取BCD时间 out: [out] 保存获取到的BCD时间,格式为:秒分时日月年(各占一字节,BCD格式)*/void getBCDTime(UINT8 *out){ time_t t; int i = 0; struct tm *tp = NULL; t = time(NU 阅读全文
posted @ 2011-05-27 15:31 清清飞扬 阅读(1228) 评论(0) 推荐(0) 编辑