GBDK 2020 Docs
API Documentation for GBDK 2020
bcd.h
Go to the documentation of this file.
1 #ifndef __BCD_H_INCLUDE
2 #define __BCD_H_INCLUDE
3 
4 #include <asm/types.h>
5 
12 // macro for creating BCD constants
13 #define BCD_HEX(v) ((BCD)(v))
14 
19 #define MAKE_BCD(v) BCD_HEX(0x ## v)
20 
21 typedef unsigned long BCD;
22 
27 void uint2bcd(unsigned int i, BCD * value);
28 
33 void bcd_add(BCD * sour, const BCD * value);
34 
39 void bcd_sub(BCD * sour, const BCD * value);
40 
58 UBYTE bcd2text(const BCD * bcd, UBYTE tile_offset, unsigned char * buffer);
59 
60 #endif
bcd2text
UBYTE bcd2text(const BCD *bcd, UBYTE tile_offset, unsigned char *buffer)
bcd_add
void bcd_add(BCD *sour, const BCD *value)
types.h
UBYTE
UINT8 UBYTE
Definition: types.h:45
uint2bcd
void uint2bcd(unsigned int i, BCD *value)
bcd_sub
void bcd_sub(BCD *sour, const BCD *value)
BCD
unsigned long BCD
Definition: bcd.h:21