diff options
Diffstat (limited to 'include/apilib/octapi_bt0.h')
-rw-r--r-- | include/apilib/octapi_bt0.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/include/apilib/octapi_bt0.h b/include/apilib/octapi_bt0.h new file mode 100644 index 0000000..a7dd534 --- /dev/null +++ b/include/apilib/octapi_bt0.h @@ -0,0 +1,70 @@ +/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\ + +File: octapi_bt0.h + +Copyright (c) 2001 Octasic Inc. All rights reserved. + +Description: + +This source code is Octasic Confidential. Use of and access to this code +is covered by the Octasic Device Enabling Software License Agreement. +Acknowledgement of the Octasic Device Enabling Software License was +required for access to this code. A copy was also provided with the release. + + +$Octasic_Release: OCT610xAPI-01.00-PR37 $ + +$Octasic_Revision: 10 $ + +\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ +#ifndef __OCTAPI_BT0_H__ +#define __OCTAPI_BT0_H__ + + +#include "octdef.h" + + +#define OCTAPI_BT0_BASE 0xFFFF0000 +#define OCTAPI_BT0_KEY_SIZE_NOT_MUTLIPLE_OF_UINT32 OCTAPI_BT0_BASE+0x0001 +#define OCTAPI_BT0_DATA_SIZE_NOT_MUTLIPLE_OF_UINT32 OCTAPI_BT0_BASE+0x0002 +#define OCTAPI_BT0_MALLOC_FAILED OCTAPI_BT0_BASE+0x0003 +#define OCTAPI_BT0_NO_NODES_AVAILABLE OCTAPI_BT0_BASE+0x0004 +#define OCTAPI_BT0_KEY_ALREADY_IN_TREE OCTAPI_BT0_BASE+0x0005 +#define OCTAPI_BT0_KEY_NOT_IN_TREE OCTAPI_BT0_BASE+0x0006 + +/* Possible result for Find Or Add function.*/ +#define OCTAPI0_BT0_NODE_FOUND 0 +#define OCTAPI0_BT0_NODE_ADDDED 1 + +#define OCTAPI_BT0_NO_SMALLER_KEY 0xAAAAAAAA + + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus*/ + +#define octapi_bt0_get_size( number_of_items, key_size, data_size, b_size ) OctApiBt0GetSize( (UINT32) number_of_items,(UINT32) key_size, (UINT32) data_size, (PUINT32) b_size ) +#define octapi_bt0_init(b, number_of_items, key_size, data_size) OctApiBt0Init( (void **) b,(UINT32) number_of_items,(UINT32) key_size, (UINT32) data_size ) +#define octapi_bt0_add_node( b, key, data ) OctApiBt0AddNode( (void *) b,(void *) key,(void **) data ) +#define octapi_bt0_remove_node( b, key ) OctApiBt0RemoveNode( (void *) b,(void *) key ) +#define octapi_bt0_query_node( b, key, data ) OctApiBt0QueryNode( (void *) b,(void *) key,(void **) data ) +#define octapi_bt0_get_first_node( b,key, data ) OctApiBt0GetFirstNode( (void *) b,(void **) key, (void **) data ) + + +static UINT32 OctApiBt0GetSize( UINT32 number_of_items,UINT32 key_size, UINT32 data_size, UINT32 * b_size ); +static UINT32 OctApiBt0Init( void ** b,UINT32 number_of_items,UINT32 key_size, UINT32 data_size ); +UINT32 OctApiBt0AddNode( void * b,void * key,void ** data ); +UINT32 OctApiBt0RemoveNode( void * b,void * key ); +UINT32 OctApiBt0QueryNode( void * b,void * key,void ** data ); +UINT32 OctApiBt0GetFirstNode( void * b,void ** key, void ** data ); +UINT32 OctApiBt0FindOrAddNode(void * b,void * key,void ** data, UINT32 *fnct_result); + +UINT32 OctApiBt0AddNodeReportPrevNodeData(void * b,void * key,void ** data, void ** prev_data, UINT32 *fnct_result ); + +#ifdef __cplusplus +} +#endif /* __cplusplus*/ + + + +#endif /*__OCTAPI_BT0_H__*/ |