nerves_time v0.4.0 NervesTime.RealTimeClock.BCD View Source
Convert between integers and binary-coded decimals (BCD)
BCD is commonly used in Real-time clock chips for historical reasons. See wikipedia.org/wiki/Binary-coded_decimal for a good background on BCD. The BCD implementation here is referred to as "Packed BCD" in the article.
Link to this section Summary
Functions
Convert a 8 bit integer value to a BCD binary
Convert an 8 bit bcd-encoded value to an integer
Link to this section Types
Link to this type
t()
View Sourcet() :: 0..9 | 16..25 | 32..41 | 48..57 | 64..73 | 80..89 | 96..105 | 112..121 | 128..137 | 144..153
Support two digit BCD
Link to this section Functions
Convert a 8 bit integer value to a BCD binary
Convert an 8 bit bcd-encoded value to an integer