source: svn/newcon3bcm2_21bu/magnum/commonutils/mth/bmth_fix_priv.h

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 2.5 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2010, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bmth_fix_priv.h $
11 * $brcm_Revision: Hydra_Software_Devel/4 $
12 * $brcm_Date: 8/26/10 7:46p $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/commonutils/mth/bmth_fix_priv.h $
19 *
20 * Hydra_Software_Devel/4   8/26/10 7:46p albertl
21 * SW7405-4556, SW7405-4515: Changed multiplication to use 64-bit
22 * intermediate.  Added fix to float macro.
23 *
24 * Hydra_Software_Devel/3   2/17/09 6:48p albertl
25 * PR51613: Updated to correct naming conventions.
26 *
27 * Hydra_Software_Devel/2   8/9/07 12:27p tdo
28 * PR33574: Convert more macro defines into functions to avoid compiling
29 * errors in WinCE build
30 *
31 * Hydra_Software_Devel/1   2/22/06 6:11p albertl
32 * PR18913:  Initial revision of BMTH_FIX fixed point math library.
33 *
34 *
35 ***************************************************************************/
36#ifndef BMTH_FIX_PRIV_H__
37#define BMTH_FIX_PRIV_H__
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#include "bstd.h"
44#include "bkni.h"
45
46#define BMTH_P_FIX_MAX_BITS 32
47#define BMTH_P_FIX_SIGNED_MAX_BITS (BMTH_P_FIX_MAX_BITS - 1)
48
49#define BMTH_P_FIX_UNSIGNED_PI 0xC90FDAA2 /* pi in 2.30 unsigned fixed notation */
50#define BMTH_P_FIX_UNSIGNED_HALF_PI (BMTH_P_FIX_UNSIGNED_PI / 2)
51#define BMTH_P_FIX_UNSIGNED_PI_INT_BITS 1
52#define BMTH_P_FIX_UNSIGNED_RAD_FRACT_BITS 30
53
54#define BMTH_P_FIX_SINMAG_TABLE_SIZE (sizeof(s_lFixSinMagTable) / sizeof(uint32_t))
55
56#define BMTH_P_FIX_SIGNED_SINMAG_INT_BITS 1
57#define BMTH_P_FIX_SIGNED_SINMAG_FRACT_BITS 10
58#define BMTH_P_FIX_SIGNED_RAD_INT_BITS 3
59#define BMTH_P_FIX_SIGNED_RAD_FRACT_BITS 28
60#define BMTH_P_FIX_SIGNED_RAD_INTERP_INT_BITS 1
61#define BMTH_P_FIX_SIGNED_RAD_INTERP_FRACT_BITS 15
62
63
64/* creates a mask with signed bit plus integer bits and fraction bits */
65#define BMTH_P_FIX_SIGNED_MASK(intbits, fractbits) \
66        (0xFFFFFFFF >> (BMTH_P_FIX_SIGNED_MAX_BITS - (intbits + fractbits)))
67
68/* creates signed bit mask of given fixed point format */
69#define BMTH_P_FIX_SIGN_BIT(intbits, fractbits) \
70        (1 << (intbits + fractbits))
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif  /* #ifndef BMTH_FIX_PRIV_H__ */
77/* End of File */
Note: See TracBrowser for help on using the repository browser.