Macros | Functions
sbgDefines.h File Reference

Header file that contains all common definitions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __BASE_FILE__   __FILE__
 
#define FALSE   (0)
 
#define NULL   (0)
 
#define SBG_ARRAY_SIZE(a)   (sizeof(a) / sizeof((a)[0]))
 
#define SBG_DELETE   if (p){free(p); (p) = NULL;}
 
#define SBG_DELETE_ARRAY   if (p){free(p); (p) = NULL;}
 
#define SBG_DEPRECATED(func)   func
 
#define SBG_DEPRECATED_MACRO(func)   func
 
#define SBG_DISABLE   (0)
 
#define SBG_ENABLE   (1)
 
#define SBG_FREE(p)   if (p){free(p); (p) = NULL;}
 
#define SBG_FREE_ARRAY(p)   if (p){free(p); (p) = NULL;}
 
#define SBG_INLINE   static inline
 
#define SBG_INVALID_HANDLE   (0x00000000u)
 
#define SBG_NOT_FOUND   (0xFFFFFFFFu)
 
#define SBG_PI   3.14159265358979323846
 
#define SBG_PI_F   3.14159265358979323846f
 
#define SBG_UNDEFINED   (0xFFFFFFFFu)
 
#define SBG_UNUSED_PARAMETER(x)   (void)(x)
 
#define sbgClamp(value, minValue, maxValue)   (((value) < (minValue))?(minValue): ((value) > (maxValue)?maxValue:value))
 
#define sbgMax(a, b)   (((a) > (b)) ? (a) : (b))
 
#define sbgMin(a, b)   (((a) < (b)) ? (a) : (b))
 
#define TRUE   (1)
 

Functions

SBG_INLINE double sbgDegToRadD (double angle)
 
SBG_INLINE float sbgDegToRadF (float angle)
 
SBG_INLINE double sbgRadToDegD (double angle)
 
SBG_INLINE float sbgRadToDegF (float angle)
 

Detailed Description

Header file that contains all common definitions.

Author
SBG Systems (Raphael Siryani)
Date
17 March 2015

Copyright Notice

Copyright (C) 2007-2015, SBG Systems SAS. All rights reserved.

This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.

THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

Definition in file sbgDefines.h.

Macro Definition Documentation

#define __BASE_FILE__   __FILE__

BASE_FILE is gcc specific

Definition at line 67 of file sbgDefines.h.

#define FALSE   (0)

Definition at line 35 of file sbgDefines.h.

#define NULL   (0)

Definition at line 43 of file sbgDefines.h.

#define SBG_ARRAY_SIZE (   a)    (sizeof(a) / sizeof((a)[0]))

Definition at line 59 of file sbgDefines.h.

#define SBG_DELETE   if (p){free(p); (p) = NULL;}

Definition at line 77 of file sbgDefines.h.

#define SBG_DELETE_ARRAY   if (p){free(p); (p) = NULL;}

Definition at line 78 of file sbgDefines.h.

#define SBG_DEPRECATED (   func )    func

This macro is used to define a new section of packed structures. All structures defined after this macro will be packed.

This macro is used to specify that a structure is packed.

This macro is used to close the section of packed structures and return to the default packing.

Macro used to indicate that a function is deprecated.

Definition at line 156 of file sbgDefines.h.

#define SBG_DEPRECATED_MACRO (   func)    func

Macro used to indicate that a macro is deprecated.

Definition at line 168 of file sbgDefines.h.

#define SBG_DISABLE   (0)

Definition at line 27 of file sbgDefines.h.

#define SBG_ENABLE   (1)

Definition at line 31 of file sbgDefines.h.

#define SBG_FREE (   p)    if (p){free(p); (p) = NULL;}

Definition at line 79 of file sbgDefines.h.

#define SBG_FREE_ARRAY (   p)    if (p){free(p); (p) = NULL;}

Definition at line 80 of file sbgDefines.h.

#define SBG_INLINE   static inline

Macro used to abstract the compiler specific inline keyword.

Definition at line 94 of file sbgDefines.h.

#define SBG_INVALID_HANDLE   (0x00000000u)

Definition at line 47 of file sbgDefines.h.

#define SBG_NOT_FOUND   (0xFFFFFFFFu)

Definition at line 51 of file sbgDefines.h.

#define SBG_PI   3.14159265358979323846

Definition at line 175 of file sbgDefines.h.

#define SBG_PI_F   3.14159265358979323846f

Definition at line 179 of file sbgDefines.h.

#define SBG_UNDEFINED   (0xFFFFFFFFu)

Definition at line 55 of file sbgDefines.h.

#define SBG_UNUSED_PARAMETER (   x)    (void)(x)

Macro used to avoid compiler warning when a variable is not used.

Definition at line 102 of file sbgDefines.h.

#define sbgClamp (   value,
  minValue,
  maxValue 
)    (((value) < (minValue))?(minValue): ((value) > (maxValue)?maxValue:value))

Clamp a value between minValue and maxValue ie minValue <= value <= maxValue

Parameters
[in]valueFirst operand.
[in]minValueFirst operand.
[in]maxValueSecond operand.
Returns
The clamped value.

Definition at line 210 of file sbgDefines.h.

#define sbgMax (   a,
 
)    (((a) > (b)) ? (a) : (b))

Returns the maximum between a and b

Parameters
[in]aFirst operand.
[in]bSecond operand.
Returns
The maximum between a and b.

Definition at line 189 of file sbgDefines.h.

#define sbgMin (   a,
 
)    (((a) < (b)) ? (a) : (b))

Returns the minimum between a and b

Parameters
[in]aFirst operand.
[in]bSecond operand.
Returns
The minimum between a and b.

Definition at line 199 of file sbgDefines.h.

#define TRUE   (1)

Definition at line 39 of file sbgDefines.h.

Function Documentation

SBG_INLINE double sbgDegToRadD ( double  angle)

Convert an angle from degrees to radians using double precision.

Parameters
[in]angleThe angle to convert in degrees.
Returns
The converted angle in radians.

Definition at line 228 of file sbgDefines.h.

SBG_INLINE float sbgDegToRadF ( float  angle)

Convert an angle from degrees to radians using single (float) precision.

Parameters
[in]angleThe angle to convert in degrees.
Returns
The converted angle in radians.

Definition at line 248 of file sbgDefines.h.

SBG_INLINE double sbgRadToDegD ( double  angle)

Convert an angle from radians to degrees using double precision.

Parameters
[in]angleThe angle to convert in radians.
Returns
The converted angle in degrees.

Definition at line 218 of file sbgDefines.h.

SBG_INLINE float sbgRadToDegF ( float  angle)

Convert an angle from radians to degrees using single (float) precision.

Parameters
[in]angleThe angle to convert in radians.
Returns
The converted angle in degrees.

Definition at line 238 of file sbgDefines.h.



sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20