GBDK 2020 Docs  4.1.1
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 <types.h>
5 #include <stdint.h>
6 
13 // macro for creating BCD constants
14 #define BCD_HEX(v) ((BCD)(v))
15 
20 #define MAKE_BCD(v) BCD_HEX(0x ## v)
21 
22 typedef uint32_t BCD;
23 
28 void uint2bcd(uint16_t i, BCD * value) OLDCALL;
29 
34 void bcd_add(BCD * sour, const BCD * value) OLDCALL;
35 
40 void bcd_sub(BCD * sour, const BCD * value) OLDCALL;
41 
59 uint8_t bcd2text(const BCD * bcd, uint8_t tile_offset, uint8_t * buffer) OLDCALL;
60 
61 #endif
#define OLDCALL
Definition: types.h:21
void bcd_add(BCD *sour, const BCD *value) OLDCALL
uint32_t BCD
Definition: bcd.h:22
void bcd_sub(BCD *sour, const BCD *value) OLDCALL
uint8_t bcd2text(const BCD *bcd, uint8_t tile_offset, uint8_t *buffer) OLDCALL
void uint2bcd(uint16_t i, BCD *value) OLDCALL
unsigned long int uint32_t
Definition: stdint.h:53
unsigned char uint8_t
Definition: stdint.h:51
unsigned short int uint16_t
Definition: stdint.h:52