nn::math::MakeBits Function

Syntax

template <typename T>
bit32 MakeBits(
     T v,
     int width,
     int shift
);

Template Arguments

Name Description
T Type representing a bit array data

Arguments

Name Description
in v Target value
in width The range to extract
in shift The position from the least significant bit

Return Values

Returns the calculation from v, width, and shift.

Description

Returns a 32-bit data leaving only the specified range.

Extracts a range specified by width starting at the position shifted by shift bits from the least significant bit for v.

Revision History

2011/03/01
Initial version.

CONFIDENTIAL