Available Versions; Declaration; Mlib_Conv - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

2.7.1 Available versions

This function is available in the following versions:
• Integer output with fractional input - the output is the unsigned integer value when
the input is fractional; the result is greater than or equal to 0.
The available versions of the
Function name
Input type
MLIB_Clb_U16s
frac16_t
MLIB_Clb_U16l
frac32_t

2.7.2 Declaration

The available
MLIB_Clb
uint16_t MLIB_Clb_U16s(frac16_t
uint16_t MLIB_Clb_U16l(frac32_t
2.7.3 Function use
The use of the
MLIB_Clb
#include "mlib.h"
static
uint16_t
u16Result;
static
frac32_t
f32Val;
void main(void)
{
f32Val = FRAC32(0.00000452);
/* u16Result = clb(f32Val) */
u16Result = MLIB_Clb_U16l(f32Val);
}

2.8 MLIB_Conv

Freescale Semiconductor, Inc.
MLIB_Clb
function are shown in the following table.
Table 2-7. Function versions
Result type
uint16_t
Counts the leading bits of a 16-bit fractional value. The output is within
the range <0 ; 15>.
uint16_t
Counts the leading bits of a 32-bit fractional value. The output is within
the range <0 ; 31>.
functions have the following declarations:
f16Val)
f32Val)
function is shown in the following example:
/* f32Val = 0.00000452 */
MLIB User's Guide, Rev. 2, 10/2015
Chapter 2 Algorithms in detail
Description
31

Advertisement

Table of Contents
loading

Table of Contents