For BU9480F D-A Conv.

Dependencies:   mbed

_bitio.h

Committer:
lynxeyed_atsu
Date:
2010-08-26
Revision:
0:805cffac956b
Child:
1:02bfb013660c

File content as of revision 0:805cffac956b:

#ifndef    ___BITIO_H__
#define    ___BITIO_H__

#define TRUE     1
#define FALSE    0
#define rightbits(n, x) ((x) & ((1U << (n)) - 1U)) 

#define OVERRUN 0xffff
#define k 0x0b //    k:0x09 to 0x0b?    

typedef unsigned int  Uint;
typedef unsigned char Uchar;

extern FILE *infp, *outfp;
extern int  getcount, putcount;
extern Uint bitbuf;

/* Rice Golomb en-decoding */
extern void decode(void);
extern void encode(long int n);


void init_bit_o(void);
void init_bit_i(void);
Uint getbit(void);
Uint getbits(int n);
void putbit(Uint bit);
void putbits(int n, Uint x);



#endif