This commit is contained in:
2017-07-24 17:13:16 -04:00
commit ac42f6e84a
6 changed files with 1276 additions and 0 deletions

15
nibble.h Normal file
View File

@@ -0,0 +1,15 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
// struct for sizeof info
typedef struct { short internal[10]; } bcd;
bcd bcd_zeros();
bcd bcd_from_8(uint8_t);
bcd bcd_from_16(uint16_t);
bcd bcd_from_32(uint32_t);
bcd bcd_from_64(uint64_t);
uint8_t bcd_digits(bcd);
uint64_t bcd_to_64(bcd);
char* bcd_to_string(bcd);