| /src/external/gpl3/gdb/dist/sim/m32c/ |
| misc.c | 30 bcd2int (int bcd, int w) 35 v += (bcd % 16) * m; 37 bcd /= 16; 45 int bcd = 0, m = 1, i; local 48 bcd += (v % 10) * m; 52 return bcd;
|
| /src/external/gpl3/gdb/dist/sim/rx/ |
| misc.c | 30 bcd2int (int bcd, int w) 35 v += (bcd % 16) * m; 37 bcd /= 16; 45 int bcd = 0, m = 1, i; local 48 bcd += (v % 10) * m; 52 return bcd;
|
| /src/external/gpl3/gdb.old/dist/sim/m32c/ |
| misc.c | 30 bcd2int (int bcd, int w) 35 v += (bcd % 16) * m; 37 bcd /= 16; 45 int bcd = 0, m = 1, i; local 48 bcd += (v % 10) * m; 52 return bcd;
|
| /src/external/gpl3/gdb.old/dist/sim/rx/ |
| misc.c | 30 bcd2int (int bcd, int w) 35 v += (bcd % 16) * m; 37 bcd /= 16; 45 int bcd = 0, m = 1, i; local 48 bcd += (v % 10) * m; 52 return bcd;
|
| /src/sys/dev/i2c/ |
| pcf8563.c | 137 uint8_t bcd[PCF8563_NREGS]; local 147 ®, 1, &bcd[reg], PCF8563_R_YEAR - reg + 1, 156 if (bcd[PCF8563_R_SECOND] & PCF8563_M_VL) 159 dt->dt_sec = bcdtobin(bcd[PCF8563_R_SECOND] & PCF8563_M_SECOND); 160 dt->dt_min = bcdtobin(bcd[PCF8563_R_MINUTE] & PCF8563_M_MINUTE); 161 dt->dt_hour = bcdtobin(bcd[PCF8563_R_HOUR] & PCF8563_M_HOUR); 162 dt->dt_day = bcdtobin(bcd[PCF8563_R_DAY] & PCF8563_M_DAY); 163 dt->dt_wday = bcdtobin(bcd[PCF8563_R_WEEKDAY] & PCF8563_M_WEEKDAY); 164 dt->dt_mon = bcdtobin(bcd[PCF8563_R_MONTH] & PCF8563_M_MONTH); 166 (bcdtobin(bcd[PCF8563_R_YEAR] & PCF8563_M_YEAR) % 100) 176 uint8_t bcd[PCF8563_NREGS]; local [all...] |
| rs5c372.c | 157 uint8_t bcd[RS5C372_NRTC_REGS]; local 169 cmdbuf, 1, bcd, RS5C372_NRTC_REGS, 0)) != 0) { 181 dt->dt_sec = bcdtobin(bcd[RS5C372_SECONDS] & RS5C372_SECONDS_MASK); 182 dt->dt_min = bcdtobin(bcd[RS5C372_MINUTES] & RS5C372_MINUTES_MASK); 183 dt->dt_hour = bcdtobin(bcd[RS5C372_HOURS] & RS5C372_HOURS_24MASK); 184 dt->dt_day = bcdtobin(bcd[RS5C372_DATE] & RS5C372_DATE_MASK); 185 dt->dt_mon = bcdtobin(bcd[RS5C372_MONTH] & RS5C372_MONTH_MASK); 186 dt->dt_year = bcdtobin(bcd[RS5C372_YEAR]) + 2000; 194 uint8_t bcd[RS5C372_NRTC_REGS]; local 202 bcd[RS5C372_SECONDS] = bintobcd(dt->dt_sec) [all...] |
| m41t00.c | 254 u_int8_t bcd[M41T00_NBYTES], cmdbuf[1]; local 270 &bcd[i], 1, 0)) != 0) { 286 dt->dt_sec = bcdtobin(bcd[M41T00_SEC] & M41T00_SEC_MASK); 287 dt->dt_min = bcdtobin(bcd[M41T00_MIN] & M41T00_MIN_MASK); 288 dt->dt_hour = bcdtobin(bcd[M41T00_CENHR] & M41T00_HOUR_MASK); 289 dt->dt_day = bcdtobin(bcd[M41T00_DATE] & M41T00_DATE_MASK); 290 dt->dt_wday = bcdtobin(bcd[M41T00_DAY] & M41T00_DAY_MASK); 291 dt->dt_mon = bcdtobin(bcd[M41T00_MONTH] & M41T00_MONTH_MASK); 292 dt->dt_year = bcdtobin(bcd[M41T00_YEAR] & M41T00_YEAR_MASK); 307 uint8_t bcd[M41T00_DATE_BYTES], cmdbuf[2] local [all...] |
| max6900.c | 281 u_int8_t bcd[MAX6900_BURST_LEN], cmdbuf[1]; local 296 &bcd[i], 1, 0)) != 0) { 312 dt->dt_sec = bcdtobin(bcd[MAX6900_BURST_SECOND] & MAX6900_SECOND_MASK); 313 dt->dt_min = bcdtobin(bcd[MAX6900_BURST_MINUTE] & MAX6900_MINUTE_MASK); 315 if (bcd[MAX6900_BURST_HOUR] & MAX6900_HOUR_12HRS) { 316 dt->dt_hour = bcdtobin(bcd[MAX6900_BURST_HOUR] & 318 if (bcd[MAX6900_BURST_HOUR] & MAX6900_HOUR_12HRS_PM) 321 dt->dt_hour = bcdtobin(bcd[MAX6900_BURST_HOUR] & 325 dt->dt_day = bcdtobin(bcd[MAX6900_BURST_DATE] & MAX6900_DATE_MASK); 326 dt->dt_mon = bcdtobin(bcd[MAX6900_BURST_MONTH] & MAX6900_MONTH_MASK) 338 uint8_t bcd[MAX6900_BURST_LEN], cmdbuf[2]; local [all...] |
| r2025.c | 110 uint8_t bcd[R2025_CLK_SIZE]; local 122 if ((error = r2025rtc_reg_read(sc, R2025_REG_SEC, &bcd[0], 129 dt->dt_sec = bcdtobin(bcd[R2025_REG_SEC] & R2025_REG_SEC_MASK); 130 dt->dt_min = bcdtobin(bcd[R2025_REG_MIN] & R2025_REG_MIN_MASK); 131 hour = bcdtobin(bcd[R2025_REG_HOUR] & R2025_REG_HOUR_MASK); 145 dt->dt_wday = bcdtobin(bcd[R2025_REG_WDAY] & R2025_REG_WDAY_MASK); 146 dt->dt_day = bcdtobin(bcd[R2025_REG_DAY] & R2025_REG_DAY_MASK); 147 dt->dt_mon = bcdtobin(bcd[R2025_REG_MON] & R2025_REG_MON_MASK); 148 dt->dt_year = bcdtobin(bcd[R2025_REG_YEAR] & R2025_REG_YEAR_MASK) 149 + ((bcd[R2025_REG_MON] & R2025_REG_MON_Y1920) ? 2000 : 1900) 159 uint8_t bcd[R2025_CLK_SIZE]; local [all...] |
| s390.c | 128 uint8_t bcd[S390_RT1_NBYTES]; local 131 if ((error = s390rtc_read(sc, S390_REALTIME1, bcd, 138 dt->dt_sec = bcdtobin(bcd[S390_RT1_SECOND]); 139 dt->dt_min = bcdtobin(bcd[S390_RT1_MINUTE]); 140 dt->dt_hour = bcdtobin(bcd[S390_RT1_HOUR] & 0x3f); 141 dt->dt_day = bcdtobin(bcd[S390_RT1_DAY]); 142 dt->dt_mon = bcdtobin(bcd[S390_RT1_MONTH]); 143 dt->dt_year = bcdtobin(bcd[S390_RT1_YEAR]) + 2000; 152 uint8_t bcd[S390_RT1_NBYTES]; local 158 bcd[S390_RT1_SECOND] = bintobcd(dt->dt_sec) [all...] |
| x1226.c | 275 u_int8_t bcd[X1226_REG_RTC_SIZE], cmdbuf[2]; local 293 &bcd[i], 1, 0)) != 0) { 306 * Convert the X1226's register bcd values 308 dt->dt_sec = bcdtobin(bcd[X1226_REG_SC - X1226_REG_RTC_BASE] 310 dt->dt_min = bcdtobin(bcd[X1226_REG_MN - X1226_REG_RTC_BASE] 312 if (!(bcd[X1226_REG_HR - X1226_REG_RTC_BASE] & X1226_FLAG_HR_24H)) { 313 dt->dt_hour = bcdtobin(bcd[X1226_REG_HR - X1226_REG_RTC_BASE] 315 if (bcd[X1226_REG_HR - X1226_REG_RTC_BASE] & X1226_FLAG_HR_12HPM) { 319 dt->dt_hour = bcdtobin(bcd[X1226_REG_HR - X1226_REG_RTC_BASE] 322 dt->dt_wday = bcdtobin(bcd[X1226_REG_DW - X1226_REG_RTC_BASE 341 u_int8_t bcd[X1226_REG_RTC_SIZE], cmdbuf[3]; local [all...] |
| pcf8583.c | 326 u_int8_t bcd[10], cmdbuf[1]; local 341 &bcd[i], 1, 0))) { 357 *centi = bcdtobin(bcd[PCF8583_REG_CENTI]); 358 dt->dt_sec = bcdtobin(bcd[PCF8583_REG_SEC]); 359 dt->dt_min = bcdtobin(bcd[PCF8583_REG_MIN]); 360 dt->dt_hour = bcdtobin(bcd[PCF8583_REG_HOUR] & PCF8583_HOUR_MASK); 361 if (bcd[PCF8583_REG_HOUR] & PCF8583_HOUR_12H) { 363 if (bcd[PCF8583_REG_HOUR] & PCF8583_HOUR_PM) 367 dt->dt_day = bcdtobin(bcd[PCF8583_REG_YEARDATE] & PCF8583_DATE_MASK); 368 dt->dt_mon = bcdtobin(bcd[PCF8583_REG_WKDYMON] & PCF8583_MON_MASK) 389 uint8_t bcd[10], cmdbuf[2]; local [all...] |
| m41st84.c | 351 u_int8_t bcd[M41ST84_REG_DATE_BYTES], cmdbuf[2]; local 390 &bcd[i], 1, 0)) != 0) { 405 dt->dt_sec = bcdtobin(bcd[M41ST84_REG_SEC] & M41ST84_SEC_MASK); 406 dt->dt_min = bcdtobin(bcd[M41ST84_REG_MIN] & M41ST84_MIN_MASK); 407 dt->dt_hour = bcdtobin(bcd[M41ST84_REG_CENHR] & M41ST84_HOUR_MASK); 408 dt->dt_day = bcdtobin(bcd[M41ST84_REG_DATE] & M41ST84_DATE_MASK); 409 dt->dt_mon = bcdtobin(bcd[M41ST84_REG_MONTH] & M41ST84_MONTH_MASK); 413 dt->dt_year = bcdtobin(bcd[M41ST84_REG_YEAR]) + POSIX_BASE_YEAR; 422 uint8_t bcd[M41ST84_REG_DATE_BYTES], cmdbuf[2]; local 429 bcd[M41ST84_REG_CSEC] = bintobcd(0); /* must always write as 0 * [all...] |
| ds1307.c | 512 uint8_t bcd[DSXXXX_RTC_SIZE], cmdbuf[1]; local 529 sc->sc_address, cmdbuf, 1, &bcd[i], 1, 0); 545 dt->dt_sec = bcdtobin(bcd[DSXXXX_SECONDS] & DSXXXX_SECONDS_MASK); 546 dt->dt_min = bcdtobin(bcd[DSXXXX_MINUTES] & DSXXXX_MINUTES_MASK); 548 if ((bcd[DSXXXX_HOURS] & DSXXXX_HOURS_12HRS_MODE) != 0) { 549 dt->dt_hour = bcdtobin(bcd[DSXXXX_HOURS] & 551 if (bcd[DSXXXX_HOURS] & DSXXXX_HOURS_12HRS_PM) 554 dt->dt_hour = bcdtobin(bcd[DSXXXX_HOURS] & 557 dt->dt_day = bcdtobin(bcd[DSXXXX_DATE] & DSXXXX_DATE_MASK); 558 dt->dt_mon = bcdtobin(bcd[DSXXXX_MONTH] & DSXXXX_MONTH_MASK) 572 uint8_t bcd[DSXXXX_RTC_SIZE], cmdbuf[2]; local [all...] |
| /src/external/bsd/ntp/dist/kernel/sys/ |
| i8253.h | 28 unsigned int bcd : 1; member in struct:__anon7389::__anon7390
|
| /src/external/gpl3/gcc/dist/libdecnumber/dpd/ |
| decimal64.c | 750 uInt bcd; /* BCD result */ local 792 bcd=DPD2BCD[dpd]; /* convert 10 bits to 12 bits BCD */ 794 /* now accumulate the 3 BCD nibbles into units */ 795 nibble=bcd & 0x00f; 799 bcd>>=4; 801 /* if this is the last declet and the remaining nibbles in bcd */ 805 if (n==0 && !bcd) break; 807 nibble=bcd & 0x00f [all...] |
| /src/external/gpl3/gcc.old/dist/libdecnumber/dpd/ |
| decimal64.c | 751 uInt bcd; /* BCD result */ local 793 bcd=DPD2BCD[dpd]; /* convert 10 bits to 12 bits BCD */ 795 /* now accumulate the 3 BCD nibbles into units */ 796 nibble=bcd & 0x00f; 800 bcd>>=4; 802 /* if this is the last declet and the remaining nibbles in bcd */ 806 if (n==0 && !bcd) break; 808 nibble=bcd & 0x00f [all...] |
| /src/external/gpl3/gdb/dist/libdecnumber/dpd/ |
| decimal64.c | 751 uInt bcd; /* BCD result */ local 793 bcd=DPD2BCD[dpd]; /* convert 10 bits to 12 bits BCD */ 795 /* now accumulate the 3 BCD nibbles into units */ 796 nibble=bcd & 0x00f; 800 bcd>>=4; 802 /* if this is the last declet and the remaining nibbles in bcd */ 806 if (n==0 && !bcd) break; 808 nibble=bcd & 0x00f [all...] |
| /src/external/gpl3/gdb.old/dist/libdecnumber/dpd/ |
| decimal64.c | 751 uInt bcd; /* BCD result */ local 793 bcd=DPD2BCD[dpd]; /* convert 10 bits to 12 bits BCD */ 795 /* now accumulate the 3 BCD nibbles into units */ 796 nibble=bcd & 0x00f; 800 bcd>>=4; 802 /* if this is the last declet and the remaining nibbles in bcd */ 806 if (n==0 && !bcd) break; 808 nibble=bcd & 0x00f [all...] |
| /src/sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/hvm/ |
| save.h | 482 uint8_t bcd; /* not supported */ member in struct:hvm_hw_pit::hvm_hw_pit_channel
|