Version:  2.0.40 2.2.26 2.4.37 3.13 3.14 3.15 3.16 3.17 3.18 3.19 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10

Linux/lib/bcd.c

  1 #include <linux/bcd.h>
  2 #include <linux/export.h>
  3 
  4 unsigned _bcd2bin(unsigned char val)
  5 {
  6         return (val & 0x0f) + (val >> 4) * 10;
  7 }
  8 EXPORT_SYMBOL(_bcd2bin);
  9 
 10 unsigned char _bin2bcd(unsigned val)
 11 {
 12         return ((val / 10) << 4) + val % 10;
 13 }
 14 EXPORT_SYMBOL(_bin2bcd);
 15 

This page was automatically generated by LXR 0.3.1 (source).  •  Linux is a registered trademark of Linus Torvalds  •  Contact us