Indigresso Wiki

Open Source Stuff for DASH7

User Tools

Site Tools


OT_config.h (OTlib)

Most code files in OpenTag, or at least main, include OT_config.h. OT_config.h actually contains very little – only a set of helper constants for identifying big and little endian systems. OT_config.h also includes the application configuration file (app_config.h), however, which is of great importance. In order to improve modularity, OpenTag code should include OT_config.h, never app_config.h.


Here is the code for OT_config.h. You may also refer to the doxygen code documentation.

#include "app_config.h"

/// Intra-Word Addressing: 
/// Using these addressing constants in the extended type unions ensures that
/// the code is portable across little and big endian architectures.

#   ifdef __BIG_ENDIAN__
#       define UPPER    0
#       define LOWER    1
#       define B0       3
#       define B1       2
#       define B2       1
#       define B3       0
#   else
#       define UPPER    1
#       define LOWER    0
#       define B0       0
#       define B1       1
#       define B2       2
#       define B3       3
#   endif
opentag/otlib/ot_config_h.txt · Last modified: 2012/03/26 20:30 by jpnorair