bcd.h 473 B

123456789101112131415161718
  1. /* Permission is hereby granted to copy, modify and redistribute this code
  2. * in terms of the GNU Library General Public License, Version 2 or later,
  3. * at your option.
  4. */
  5. /* macros to translate to/from binary and binary-coded decimal (frequently
  6. * found in RTC chips).
  7. */
  8. #ifndef _BCD_H
  9. #define _BCD_H
  10. #include <linux/compiler.h>
  11. unsigned bcd2bin(unsigned char val) __attribute_const__;
  12. unsigned char bin2bcd(unsigned val) __attribute_const__;
  13. #endif /* _BCD_H */