MCPcopy Create free account
hub / github.com/BruceDevices/firmware / Bcd2asc

Method Bcd2asc

lib/RTC/cplus_RTC.cpp:65–71  ·  view source on GitHub ↗

函 数 名: void Bcd2asc(void) 功 能: bcd 码转换成 asc 码,供Lcd显示用 说 明: 调 用: 入口参数: 返 回 值:无 ***********************************************************************/

Source from the content-addressed store, hash-verified

63返 回 值:无
64***********************************************************************/
65void cplus_RTC::Bcd2asc(void) {
66 uint8_t i, j;
67 for (j = 0, i = 0; i < 7; i++) {
68 asc[j++] = (trdata[i] & 0xf0) >> 4 | 0x30; /*格式为: 秒 分 时 日 月 星期 年 */
69 asc[j++] = (trdata[i] & 0x0f) | 0x30;
70 }
71}
72
73uint8_t cplus_RTC::Bcd2ToByte(uint8_t Value) {
74 uint8_t tmp = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected