Indigresso Wiki

Open Source Stuff for DASH7

User Tools

Site Tools


opentag:otlib:ot_config_h

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

opentag:otlib:ot_config_h [2012/03/26 20:30] (current)
jpnorair created
Line 1: Line 1:
 +====== OT_config.h (OTlib) ======
 +Most code files in [[opentag:​main|OpenTag]],​ or at least [[opentag:​otlib:​main]],​ include OT_config.h. ​ OT_config.h actually contains very little -- only a set of helper constants for identifying [[http://​en.wikipedia.org/​wiki/​Endianness|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.
 +
 +===== OTlib/​OT_config.h =====
 +Here is the code for OT_config.h. ​ You may also refer to the [[opentag:​doxygen|doxygen code documentation]].
 +<​code>​
 +#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
 +
 +</​code>​
  
opentag/otlib/ot_config_h.txt ยท Last modified: 2012/03/26 20:30 by jpnorair