bcd.h
Go to the documentation of this file.
#ifndef __BCD_H_INCLUDE
#define __BCD_H_INCLUDE
#include <types.h>
#include <stdint.h>
// macro for creating BCD constants
#define BCD_HEX(v) ((BCD)(v))
#define MAKE_BCD(v) BCD_HEX(0x ## v)
typedef uint32_t BCD;
void uint2bcd(uint16_t i, BCD * value) OLDCALL;
void bcd_add(BCD * sour, const BCD * value) OLDCALL;
void bcd_sub(BCD * sour, const BCD * value) OLDCALL;
uint8_t bcd2text(const BCD * bcd, uint8_t tile_offset, uint8_t * buffer) OLDCALL;
#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