vdr
1.7.27
|
00001 /********************************************************************** 00002 * 00003 * HDFF firmware command interface library 00004 * 00005 * Copyright (C) 2011 Andreas Regel 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation; either version 2 00010 * of the License, or (at your option) any later version. 00011 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the 00019 * Free Software Foundation, Inc., 00020 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 * 00022 *********************************************************************/ 00023 00024 #ifndef BITBUFFER_H 00025 #define BITBUFFER_H 00026 00027 #include <stdint.h> 00028 00029 typedef struct BitBuffer_t 00030 { 00031 uint8_t * Data; 00032 uint32_t MaxLength; 00033 uint32_t BitPos; 00034 } BitBuffer_t; 00035 00036 void BitBuffer_Init(BitBuffer_t * BitBuffer, 00037 uint8_t * Data, uint32_t MaxLength); 00038 00039 void BitBuffer_SetBits(BitBuffer_t * BitBuffer, int NumBits, uint32_t Data); 00040 00041 uint32_t BitBuffer_GetByteLength(BitBuffer_t * BitBuffer); 00042 00043 #endif /* BITBUFFER_H */