AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches
fp_def.h File Reference

This file is part of the AFBR-S50 API. More...

#include <stdint.h>
Include dependency graph for fp_def.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UQ6_2_MAX   ((uq6_2_t)UINT8_MAX)
 
#define UQ6_2_ONE   ((uq6_2_t)(1U<<2U))
 
#define UQ4_4_MAX   ((uq4_4_t)UINT8_MAX)
 
#define UQ4_4_ONE   ((uq4_4_t)(1U<<4U))
 
#define UQ2_6_MAX   ((uq2_6_t)UINT8_MAX)
 
#define UQ2_6_ONE   ((uq2_6_t)(1U<<6U))
 
#define UQ1_7_MAX   ((uq1_7_t)UINT8_MAX)
 
#define UQ1_7_ONE   ((uq1_7_t)(1U<<7U))
 
#define UQ0_8_MAX   ((uq0_8_t)UINT8_MAX)
 
#define Q3_4_MIN   ((q3_4_t)INT8_MIN)
 
#define Q3_4_MAX   ((q3_4_t)INT8_MAX)
 
#define UQ3_4_ONE   ((q3_4_t)(1 << 4))
 
#define Q1_6_MIN   ((q1_6_t)INT8_MIN)
 
#define Q1_6_MAX   ((q1_6_t)INT8_MAX)
 
#define UQ1_6_ONE   ((q1_6_t)(1 << 4))
 
#define UQ12_4_MAX   ((uq12_4_t)UINT16_MAX)
 
#define UQ12_4_ONE   ((uq12_4_t)(1U<<4U))
 
#define UQ10_6_MAX   ((uq10_6_t)UINT16_MAX)
 
#define UQ10_6_ONE   ((uq10_6_t)(1U << 6U))
 
#define UQ1_15_MAX   ((uq1_15_t)UINT16_MAX)
 
#define UQ1_15_ONE   ((uq1_15_t)(1U << 15U))
 
#define UQ0_16_MAX   ((uq0_16_t)UINT16_MAX)
 
#define Q11_4_MIN   ((q11_4_t)INT16_MIN)
 
#define Q11_4_MAX   ((q11_4_t)INT16_MAX)
 
#define Q11_4_ONE   ((q11_4_t)(1 << 4))
 
#define Q7_8_MIN   ((q7_8_t)INT16_MIN)
 
#define Q7_8_MAX   ((q7_8_t)INT16_MAX)
 
#define Q7_8_ONE   ((q7_8_t)(1 << 8))
 
#define Q3_12_MIN   ((q3_12_t)INT16_MIN)
 
#define Q3_12_MAX   ((q3_12_t)INT16_MAX)
 
#define Q3_12_ONE   ((q3_12_t)(1 << 12))
 
#define Q0_15_MIN   ((q0_15_t)INT16_MIN)
 
#define Q0_15_MAX   ((q0_15_t)INT16_MAX)
 
#define UQ28_4_MAX   ((uq28_4_t)UINT32_MAX)
 
#define UQ28_4_ONE   ((uq28_4_t)(1U<<4U))
 
#define UQ16_16_MAX   ((uq16_16_t)UINT32_MAX)
 
#define UQ16_16_ONE   ((uq16_16_t)(1U << 16U))
 
#define UQ16_16_E   (0x2B7E1U)
 
#define UQ10_22_MAX   ((uq10_22_t)UINT32_MAX)
 
#define UQ10_22_ONE   ((uq10_22_t)(1U << 22U))
 
#define Q27_4_MIN   ((q27_4_t)INT32_MIN)
 
#define Q27_4_MAX   ((q27_4_t)INT32_MAX)
 
#define UQ27_4_ONE   ((q27_4_t)(1 << 4))
 
#define Q16_15_MIN   ((q16_15_t)INT32_MIN)
 
#define Q16_15_MAX   ((q16_15_t)INT32_MAX)
 
#define Q15_16_MIN   ((q15_16_t)INT32_MIN)
 
#define Q15_16_MAX   ((q15_16_t)INT32_MAX)
 
#define Q15_16_ONE   ((q15_16_t)(1 << 16))
 
#define Q9_22_MIN   ((q9_22_t)INT32_MIN)
 
#define Q9_22_MAX   ((q9_22_t)INT32_MAX)
 
#define Q9_22_ONE   ((q9_22_t)(1 << 22))
 

Typedefs

typedef uint8_t uq6_2_t
 Unsigned fixed point number: UQ6.2.
 
typedef uint8_t uq4_4_t
 Unsigned fixed point number: UQ4.4.
 
typedef uint8_t uq2_6_t
 Unsigned fixed point number: UQ2.6.
 
typedef uint8_t uq1_7_t
 Unsigned fixed point number: UQ1.7.
 
typedef uint8_t uq0_8_t
 Unsigned fixed point number: UQ0.8.
 
typedef int8_t q3_4_t
 Signed fixed point number: Q3.4.
 
typedef int8_t q1_6_t
 Signed fixed point number: Q1.6.
 
typedef uint16_t uq12_4_t
 Unsigned fixed point number: UQ12.4.
 
typedef uint16_t uq10_6_t
 Unsigned fixed point number: UQ10.6.
 
typedef uint16_t uq1_15_t
 Unsigned fixed point number: UQ1.15.
 
typedef uint16_t uq0_16_t
 Unsigned fixed point number: UQ0.16.
 
typedef int16_t q11_4_t
 Signed fixed point number: Q11.4.
 
typedef int16_t q7_8_t
 Signed fixed point number: Q7.8.
 
typedef int16_t q3_12_t
 Signed fixed point number: Q3.12.
 
typedef int16_t q0_15_t
 Signed fixed point number: Q0.15.
 
typedef uint32_t uq28_4_t
 Unsigned fixed point number: UQ28.4.
 
typedef uint32_t uq16_16_t
 Unsigned fixed point number: UQ16.16.
 
typedef uint32_t uq10_22_t
 Unsigned fixed point number: UQ10.22.
 
typedef int32_t q27_4_t
 Signed fixed point number: Q27.4.
 
typedef int32_t q16_15_t
 Signed fixed point number: Q16.15.
 
typedef int32_t q15_16_t
 Signed fixed point number: Q15.16.
 
typedef int32_t q9_22_t
 Signed fixed point number: Q9.22.
 

Detailed Description

This file is part of the AFBR-S50 API.

Provides definitions and basic macros for fixed point data types.

Copyright (c) 2023, Broadcom Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.