source: svn/trunk/zas_dstar/hal/include/dsthalPsiBitBuffer.h @ 2

Last change on this file since 2 was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
File size: 1.7 KB
Line 
1/********************************************************************
2 *
3 * bitbuffer.h - Utility for extracting bits from a buffer
4 *
5 * Copyright 1997-2002 TeraLogic, Inc.
6 * All Rights Reserved
7 *
8 * bitBufferCreate:    Creates a bitBuffer object from the specified
9 *                     byte buffer.
10 *   (O) instance:     Returns the bitBuffer instance.
11 *   (I) buffer:       The byte buffer.
12 *   (I) bufSize:      Size of the byte buffer.
13 *
14 * bitBufferDestroy:   Destroys a bitBuffer object.
15 *   (I) instance:     The bitBuffer instance.
16 *
17 * bitBufferGetBits:   Extracts the specified number of bits from the
18 *                     bitBuffer.
19 *   (I) instance:     The bitBuffer instance.
20 *   (I) numberOfBits: Number of bits to be extracted. 
21 *
22 * bitBufferCheckError:Checks the error state of the bitBuffer.  Returns
23 *                     "TRUE" if the bitBuffer is in an error state.
24 *   (I) instance:     The bitBuffer instance.
25 *
26 * _Id: bitbuffer.h,v 1.2 2002/06/13 18:32:24 tvogt Exp
27 ********************************************************************/
28
29#ifndef _bitbuffer_h
30#define _bitbuffer_h
31
32#ifdef __cplusplus
33extern "C" {
34#endif 
35
36
37/*typedef struct bitBuffer bitBuffer_t, *bitBufferPtr_t;*/
38typedef struct bitBuffer bitBuffer_t;
39typedef struct bitBuffer  * bitBufferPtr_t;
40
41/* API */
42DHL_RESULT bitBufferCreate ( bitBufferPtr_t *instance, DS_U8 *buffer, DS_U32 bufSize);
43DHL_RESULT bitBufferDestroy ( bitBufferPtr_t instance);
44DS_U32 bitBufferGetBits (bitBufferPtr_t instance, DS_U8 numberOfBits);
45void bitBufferSkipBits (bitBufferPtr_t instance, DS_U16 numberOfBits);
46DS_U8* bitBufferGetBytePointer (bitBufferPtr_t instance);
47DS_BOOL bitBufferCheckError (bitBufferPtr_t instance);
48
49#ifdef __cplusplus
50}
51#endif 
52
53
54#endif /* _bitbuffer_h */
Note: See TracBrowser for help on using the repository browser.