GBDK 2020 Docs
4.5.0
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
OLDCALL
#define OLDCALL
Definition:
types.h:21
BCD
uint32_t BCD
Definition:
bcd.h:22
bcd2text
uint8_t bcd2text(const BCD *bcd, uint8_t tile_offset, uint8_t *buffer) OLDCALL
bcd_add
void bcd_add(BCD *sour, const BCD *value) OLDCALL
bcd_sub
void bcd_sub(BCD *sour, const BCD *value) OLDCALL
uint2bcd
void uint2bcd(uint16_t i, BCD *value) OLDCALL
stdint.h
uint16_t
unsigned short int uint16_t
Definition:
stdint.h:52
uint32_t
unsigned long int uint32_t
Definition:
stdint.h:53
uint8_t
unsigned char uint8_t
Definition:
stdint.h:51
gbdk-lib
include
nes
bcd.h
Generated by
1.9.2