Library to de- and encode binary coded decimals.
More...
Library to de- and encode binary coded decimals.
|
file | bcd.h |
| BCD definitions.
|
|
◆ bcd_from_byte()
static uint8_t bcd_from_byte |
( |
uint8_t |
byte | ) |
|
|
inlinestatic |
Converts a byte to a binary coded decimal.
- Parameters
-
- Returns
- A binary coded decimal (4 MSB = 10s, 4 LSB = 1s)
Definition at line 36 of file bcd.h.
◆ bcd_to_byte()
static uint8_t bcd_to_byte |
( |
uint8_t |
bcd | ) |
|
|
inlinestatic |
Converts a binary coded decimal to a byte.
- Parameters
-
[in] | bcd | A binary coded decimal (4 MSB = 10, 4 LSB = 1s) |
- Returns
- A byte
Definition at line 49 of file bcd.h.