Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: cf7d7e5a19
Fetching contributors…

Cannot retrieve contributors at this time

file 14 lines (12 sloc) 0.257 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <linux/bcd.h>
#include <linux/module.h>

unsigned bcd2bin(unsigned char val)
{
return (val & 0x0f) + (val >> 4) * 10;
}
EXPORT_SYMBOL(bcd2bin);

unsigned char bin2bcd(unsigned val)
{
return ((val / 10) << 4) + val % 10;
}
EXPORT_SYMBOL(bin2bcd);
Something went wrong with that request. Please try again.