~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to kernel/oct612x/include/apilib/octapi_largmath.h

  • Committer: Bazaar Package Importer
  • Author(s): Tzafrir Cohen
  • Date: 2008-08-28 22:58:23 UTC
  • mfrom: (11.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080828225823-r8bdunirm8hmc76m
Tags: 1:1.4.11~dfsg-2
* Patch xpp_fxs_power: Fixed an issue with hook detection of the Astribank
  FXS module.
* Don't fail init.d script if fxotune fails. This may happen if running it
  when Asterisk is already running.
* Bump standards version to 3.8.0.0 .
* Ignore false lintian warning ("m-a a-i" has "a a").
* Patch xpp_fxo_cid_always: do always pass PCM if that's what the user
  asked.
* Patch vzaphfc_proc_root_dir: fix vzaphfc on 2.6.26.
* Patch wcte12xp_flags: Proper time for irq save flags.
* Patch headers_2627: Fix location of semaphore.h for 2.6.27 .
* Patch xpp_fxs_dtmf_leak: Don't play DTMFs to the wrong channel.
* Patch wctdm_fix_alarm: Fix sending channel alarms.
* Patch device_class_2626: Fix building 2.6.26 (Closes: #493397).
* Using dh_lintian for lintian overrides, hence requiring debhelper 6.0.7.
* Lintian: we know we have direct changes. Too bad we're half-upstream :-(
* Fix doc-base section names. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
 
2
 
 
3
File:  octapi_largmath.h
 
4
 
 
5
    Copyright (c) 2001-2007 Octasic Inc.
 
6
    
 
7
Description: 
 
8
 
 
9
        Library used to perform arithmetic on integer values of an integer multiple
 
10
        of 32-bits.
 
11
 
 
12
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API  is 
 
13
free software; you can redistribute it and/or modify it under the terms of 
 
14
the GNU General Public License as published by the Free Software Foundation; 
 
15
either version 2 of the License, or (at your option) any later version.
 
16
 
 
17
The OCT6100 GPL API is distributed in the hope that it will be useful, but 
 
18
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 
19
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 
20
for more details. 
 
21
 
 
22
You should have received a copy of the GNU General Public License 
 
23
along with the OCT6100 GPL API; if not, write to the Free Software 
 
24
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
25
 
 
26
$Octasic_Release: OCT612xAPI-01.00-PR49 $
 
27
 
 
28
$Octasic_Revision: 6 $
 
29
 
 
30
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
 
31
#ifndef __OCTAPI_LARGMATH_H__
 
32
#define __OCTAPI_LARGMATH_H__
 
33
 
 
34
#include "octdef.h"
 
35
 
 
36
#define OCTAPI_LM_DIVISION_BY_ZERO              0xFFFF
 
37
#define OCTAPI_LM_OVERFLOW                              0xFFFE
 
38
#define OCTAPI_LM_ARRAY_SIZE_MISMATCH   0xFFFD
 
39
 
 
40
#define OCTAPI_LM_MAX_OPTIMIZE_MUL              10
 
41
 
 
42
#ifdef __cplusplus
 
43
extern "C" {
 
44
#endif /* __cplusplus */
 
45
 
 
46
#define octapi_lm_add( a, alen, b, blen, z,  zlen )                                     OctApiLmAdd( (PUINT32) a, (USHORT) alen, (PUINT32) b, (USHORT) blen, (PUINT32) z, (USHORT) zlen )
 
47
#define octapi_lm_subtract( a, alen, bneg, blen, z,  zlen, neg )        OctApiLmSubtract( (PUINT32) a, (USHORT) alen, (PUINT32) bneg, (USHORT) blen, (PUINT32) z, (USHORT) zlen, (USHORT*) neg )
 
48
#define octapi_lm_compare( a, alen, bneg, blen, neg )                           OctApiLmCompare( (PUINT32) a, (USHORT) alen, (PUINT32) bneg, (USHORT) blen, (USHORT*) neg )
 
49
#define octapi_lm_multiply( a, b, ablen, z )                                            OctApiLmMultiply( (PUINT32) a, (PUINT32) b, (USHORT) ablen, (PUINT32) z )
 
50
#define octapi_lm_divide( n, d, q, r, ndqrlen )                                         OctApiLmDivide( (PUINT32) n, (PUINT32) d, (PUINT32) q, (PUINT32) r, (USHORT) ndqrlen )
 
51
#define octapi_lm_shiftright1( a, alen )                                                        OctApiLmShiftRight1( (PUINT32) a, (USHORT) alen )
 
52
#define octapi_lm_shiftn( a, alen, shiftleft, shiftn )                          OctApiLmShiftn( (PUINT32) a, (USHORT) alen, (USHORT) shiftleft, (USHORT) shiftn )
 
53
#define octapi_lm_getmsb( a, alen, msb_pos )                                            OctApiLmGetMsb( (PUINT32) a, (USHORT) alen, (USHORT*) msb_pos )
 
54
        
 
55
 
 
56
UINT32 OctApiLmAdd( PUINT32 a, USHORT alen, PUINT32 b, USHORT blen, PUINT32 z, USHORT zlen );
 
57
UINT32 OctApiLmSubtract( PUINT32 a, USHORT alen, PUINT32 bneg, USHORT blen, PUINT32 z, USHORT zlen, PUSHORT neg );
 
58
UINT32 OctApiLmCompare( PUINT32 a, USHORT alen, PUINT32 bneg, USHORT blen, PUSHORT neg );
 
59
UINT32 OctApiLmMultiply( PUINT32 a, PUINT32 b, USHORT ablen, PUINT32 z );
 
60
UINT32 OctApiLmDivide( PUINT32 n, PUINT32 d, PUINT32 q, PUINT32 r, USHORT ndqrlen );
 
61
UINT32 OctApiLmShiftRight1( PUINT32 a, USHORT alen );
 
62
UINT32 OctApiLmShiftn( PUINT32 a, USHORT alen, USHORT shiftleft, USHORT shiftn );
 
63
UINT32 OctApiLmGetMsb( PUINT32 a, USHORT alen, PUSHORT msb_pos );
 
64
 
 
65
#ifdef __cplusplus
 
66
}
 
67
#endif /* __cplusplus */
 
68
 
 
69
#endif /* __OCTAPI_LARGMATH_H__ */