Bugfix/bacnet real endian simplify (#89)

* Remove dependence on endian define

* Make use of existing big_endian function if BACNET_BIG_ENDIAN is not defined

* Add efficient endian macro option if available

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2020-05-24 09:36:21 -05:00
committed by GitHub
parent 764e0e8448
commit cbfa74e48d
25 changed files with 354 additions and 257 deletions
-2
View File
@@ -56,7 +56,6 @@
<ListValues>
<Value>BACDL_MSTP</Value>
<Value>MAX_APDU=128</Value>
<Value>BIG_ENDIAN=0</Value>
<Value>MAX_TSM_TRANSACTIONS=0</Value>
<Value>MSTP_PDU_PACKET_COUNT=2</Value>
<Value>MAX_CHARACTER_STRING_BYTES=64</Value>
@@ -108,7 +107,6 @@
<ListValues>
<Value>BACDL_MSTP</Value>
<Value>MAX_APDU=128</Value>
<Value>BIG_ENDIAN=0</Value>
<Value>MAX_TSM_TRANSACTIONS=0</Value>
<Value>MSTP_PDU_PACKET_COUNT=2</Value>
<Value>MAX_CHARACTER_STRING_BYTES=64</Value>
-2
View File
@@ -257,7 +257,6 @@
<state>BACDL_MSTP</state>
<state>MAX_ANALOG_INPUTS=100</state>
<state>MAX_APDU=50</state>
<state>BIG_ENDIAN=0</state>
<state>MAX_TSM_TRANSACTIONS=0</state>
<state>MSTP_PDU_PACKET_COUNT=2</state>
<state>MAX_CHARACTER_STRING_BYTES=64</state>
@@ -1323,7 +1322,6 @@
<state>NDEBUG</state>
<state>BACDL_MSTP</state>
<state>MAX_APDU=128</state>
<state>BIG_ENDIAN=0</state>
<state>MAX_TSM_TRANSACTIONS=0</state>
<state>MSTP_PDU_PACKET_COUNT=2</state>
<state>MAX_CHARACTER_STRING_BYTES=64</state>
+1 -1
View File
@@ -1,7 +1,7 @@
<!DOCTYPE CrossStudio_Project_File>
<solution Name="bacnet" version="2">
<project Name="bacnet">
<configuration Name="Common" Platform="AVR" Target="ATmega644P" avr_architecture="V2E" avr_debug_interface="JTAG" avr_flash_size="128K" build_use_hardware_multiplier="Yes" c_preprocessor_definitions="BACDL_MSTP;MAX_APDU=128;BIG_ENDIAN=0;MAX_TSM_TRANSACTIONS=0;MAX_CHARACTER_STRING_BYTES=64;MAX_OCTET_STRING_BYTES=64;BACAPP_BOOLEAN;BACAPP_REAL;BACAPP_OBJECT_ID;BACAPP_UNSIGNED;BACAPP_ENUMERATED;BACAPP_CHARACTER_STRING;WRITE_PROPERTY" c_user_include_directories="$(ProjectDir);$(ProjectDir)/crossworks;$(ProjectDir)/../../include;$(ProjectDir)/../../src" linker_call_stack_size="1024" linker_memory_map_file="$(PackagesDir)/targets/avr/ATmega644P.xml" project_directory="" project_type="Executable"/>
<configuration Name="Common" Platform="AVR" Target="ATmega644P" avr_architecture="V2E" avr_debug_interface="JTAG" avr_flash_size="128K" build_use_hardware_multiplier="Yes" c_preprocessor_definitions="BACDL_MSTP;MAX_APDU=128;MAX_TSM_TRANSACTIONS=0;MAX_CHARACTER_STRING_BYTES=64;MAX_OCTET_STRING_BYTES=64;BACAPP_BOOLEAN;BACAPP_REAL;BACAPP_OBJECT_ID;BACAPP_UNSIGNED;BACAPP_ENUMERATED;BACAPP_CHARACTER_STRING;WRITE_PROPERTY" c_user_include_directories="$(ProjectDir);$(ProjectDir)/crossworks;$(ProjectDir)/../../include;$(ProjectDir)/../../src" linker_call_stack_size="1024" linker_memory_map_file="$(PackagesDir)/targets/avr/ATmega644P.xml" project_directory="" project_type="Executable"/>
<folder Name="Source Files">
<configuration Name="Common" filter="c;h;s;asm;inc;s90"/>
<file file_name="adc.c">
+42
View File
@@ -0,0 +1,42 @@
<!DOCTYPE CrossStudio_Session_File>
<session>
<Bookmarks/>
<Breakpoints groups="Breakpoints" active_group="Breakpoints"/>
<ExecutionProfileWindow/>
<FrameBufferWindow>
<FrameBufferWindow bufferHeight="-1" addressSpace="" addressText="" bufferWidth="-1"/>
</FrameBufferWindow>
<Memory1/>
<Memory2/>
<Memory3/>
<Memory4/>
<Project>
<ProjectSessionItem path="bacnet"/>
<ProjectSessionItem path="bacnet;bacnet"/>
</Project>
<Register1/>
<Register2/>
<Register3/>
<Register4/>
<TargetWindow programLoadAddress="" programSize="" uploadStartAddress="" programMemoryInterface="" programFileName="" uploadMemoryInterface="" programFileType="" uploadFileName="" uploadFileType="" programAction="" uploadSize=""/>
<Threads>
<ThreadsWindow showLists=""/>
</Threads>
<TraceWindow>
<Trace enabled="Yes"/>
</TraceWindow>
<Watch1>
<Watches active="1" update="Never"/>
</Watch1>
<Watch2>
<Watches active="0" update="Never"/>
</Watch2>
<Watch3>
<Watches active="0" update="Never"/>
</Watch3>
<Watch4>
<Watches active="0" update="Never"/>
</Watch4>
<Files/>
<ARMCrossStudioWindow activeProject="bacnet" fileDialogDefaultFilter="*.c" autoConnectTarget="" buildConfiguration="Common" sessionSettings="" debugSearchFileMap="" fileDialogInitialDirectory="" debugSearchPath="" autoConnectCapabilities="0"/>
</session>