From ab31fe5838da9b5f30dc0c92abf5dd5daa94bd53 Mon Sep 17 00:00:00 2001 From: Frederik Beimgraben Date: Wed, 2 Jul 2025 13:55:24 +0200 Subject: [PATCH] chore: Replace with new project (from other git) --- .ccsproject | 8 +- .clangd | 3 - .cproject | 191 +- .gitignore | 4 + .project | 2 +- .settings/org.eclipse.core.resources.prefs | 10 + Debug/.clangd/compile_commands.json | 149 +- GUIComm_JSON.c | 277 -- Include/GUIComm.h | 101 - Include/HAL.h | 101 - Include/IQmathLib.h | 3967 ----------------- Include/QmathLib.h | 2100 --------- README.html | 107 - constants.h | 6 + doxygen.conf | 2930 ++++++++++++ doxygen.sh | 7 + driverlib/MSP430FR2xx_4xx/adc.c | 244 + driverlib/MSP430FR2xx_4xx/adc.h | 892 ++++ driverlib/MSP430FR2xx_4xx/crc.c | 103 + driverlib/MSP430FR2xx_4xx/crc.h | 209 + driverlib/MSP430FR2xx_4xx/cs.c | 1245 ++++++ driverlib/MSP430FR2xx_4xx/cs.h | 845 ++++ .../MSP430FR2xx_4xx/driverlib.h | 114 +- driverlib/MSP430FR2xx_4xx/ecomp.c | 169 + driverlib/MSP430FR2xx_4xx/ecomp.h | 544 +++ driverlib/MSP430FR2xx_4xx/eusci_a_spi.c | 230 + driverlib/MSP430FR2xx_4xx/eusci_a_spi.h | 563 +++ driverlib/MSP430FR2xx_4xx/eusci_a_uart.c | 291 ++ driverlib/MSP430FR2xx_4xx/eusci_a_uart.h | 640 +++ driverlib/MSP430FR2xx_4xx/eusci_b_i2c.c | 652 +++ driverlib/MSP430FR2xx_4xx/eusci_b_i2c.h | 1045 +++++ driverlib/MSP430FR2xx_4xx/eusci_b_spi.c | 228 + driverlib/MSP430FR2xx_4xx/eusci_b_spi.h | 563 +++ driverlib/MSP430FR2xx_4xx/framctl.c | 241 + driverlib/MSP430FR2xx_4xx/framctl.h | 308 ++ driverlib/MSP430FR2xx_4xx/gpio.c | 554 +++ driverlib/MSP430FR2xx_4xx/gpio.h | 1051 +++++ driverlib/MSP430FR2xx_4xx/icc.c | 196 + driverlib/MSP430FR2xx_4xx/icc.h | 393 ++ driverlib/MSP430FR2xx_4xx/inc/hw_memmap.h | 85 + .../MSP430FR2xx_4xx/inc/version.h | 106 +- driverlib/MSP430FR2xx_4xx/lcd_e.c | 470 ++ driverlib/MSP430FR2xx_4xx/lcd_e.h | 1729 +++++++ driverlib/MSP430FR2xx_4xx/mpy32.c | 178 + driverlib/MSP430FR2xx_4xx/mpy32.h | 445 ++ driverlib/MSP430FR2xx_4xx/pmm.c | 216 + driverlib/MSP430FR2xx_4xx/pmm.h | 502 +++ .../MSP430FR2xx_4xx/rom_driverlib.h | 124 +- .../rom_headers/rom_driverlib_fr235x.h | 1437 ++++++ .../rom_headers/rom_driverlib_fr253x_fr263x.h | 496 +++ driverlib/MSP430FR2xx_4xx/rom_map_driverlib.h | 2602 +++++++++++ driverlib/MSP430FR2xx_4xx/rtc.c | 139 + driverlib/MSP430FR2xx_4xx/rtc.h | 284 ++ driverlib/MSP430FR2xx_4xx/sac.c | 234 + driverlib/MSP430FR2xx_4xx/sac.h | 512 +++ driverlib/MSP430FR2xx_4xx/sfr.c | 96 + driverlib/MSP430FR2xx_4xx/sfr.h | 290 ++ driverlib/MSP430FR2xx_4xx/sysctl.c | 239 + driverlib/MSP430FR2xx_4xx/sysctl.h | 641 +++ .../MSP430FR2xx_4xx/tia.c | 154 +- driverlib/MSP430FR2xx_4xx/tia.h | 178 + driverlib/MSP430FR2xx_4xx/timer_a.c | 381 ++ driverlib/MSP430FR2xx_4xx/timer_a.h | 1046 +++++ driverlib/MSP430FR2xx_4xx/timer_b.c | 437 ++ driverlib/MSP430FR2xx_4xx/timer_b.h | 1288 ++++++ driverlib/MSP430FR2xx_4xx/tlv.c | 239 + driverlib/MSP430FR2xx_4xx/tlv.h | 441 ++ driverlib/MSP430FR2xx_4xx/wdt_a.c | 101 + driverlib/MSP430FR2xx_4xx/wdt_a.h | 210 + i2c_lcd.c | 132 + i2c_lcd.h | 18 + include/GUI_JSON.h | 112 - {src/MSP430_GUI/jsmn => jsmn}/jsmn.c | 670 +-- {src/MSP430_GUI/jsmn => jsmn}/jsmn.h | 196 +- keypad.c | 197 + keypad.h | 20 + keypad.patch | 56 + main.c | 309 +- morse.c | 141 + morse.h | 23 + src/IQMathLib/CCS/MPY32/5xx_6xx/IQmathLib.a | Bin 1702 -> 0 bytes ...Y32_5xx_6xx_CPUX_large_code_large_data.lib | Bin 515270 -> 0 bytes ...xx_6xx_CPUX_large_code_restricted_data.lib | Bin 510830 -> 0 bytes ...Y32_5xx_6xx_CPUX_large_code_small_data.lib | Bin 506794 -> 0 bytes ...Y32_5xx_6xx_CPUX_small_code_small_data.lib | Bin 506298 -> 0 bytes src/IQMathLib/CCS/MPY32/5xx_6xx/QmathLib.a | Bin 1698 -> 0 bytes ...Y32_5xx_6xx_CPUX_large_code_large_data.lib | Bin 217680 -> 0 bytes ...xx_6xx_CPUX_large_code_restricted_data.lib | Bin 214744 -> 0 bytes ...Y32_5xx_6xx_CPUX_large_code_small_data.lib | Bin 212688 -> 0 bytes ...Y32_5xx_6xx_CPUX_small_code_small_data.lib | Bin 212448 -> 0 bytes src/MSP430_GUI/GUI_JSON.c | 201 - src/MSP430_HAL/HAL_Config_Private.h | 84 - src/MSP430_HAL/HAL_GUIComm_UART_FR235x.c | 145 - src/MSP430_HAL/HAL_IO_FR235x.c | 169 - src/MSP430_HAL/HAL_System_FR235x.c | 147 - 95 files changed, 30702 insertions(+), 8501 deletions(-) create mode 100644 .gitignore create mode 100644 .settings/org.eclipse.core.resources.prefs delete mode 100755 GUIComm_JSON.c delete mode 100755 Include/GUIComm.h delete mode 100755 Include/HAL.h delete mode 100755 Include/IQmathLib.h delete mode 100755 Include/QmathLib.h delete mode 100755 README.html create mode 100644 constants.h create mode 100644 doxygen.conf create mode 100755 doxygen.sh create mode 100755 driverlib/MSP430FR2xx_4xx/adc.c create mode 100755 driverlib/MSP430FR2xx_4xx/adc.h create mode 100755 driverlib/MSP430FR2xx_4xx/crc.c create mode 100755 driverlib/MSP430FR2xx_4xx/crc.h create mode 100755 driverlib/MSP430FR2xx_4xx/cs.c create mode 100755 driverlib/MSP430FR2xx_4xx/cs.h rename include/callbacks_JSON.h => driverlib/MSP430FR2xx_4xx/driverlib.h (68%) create mode 100755 driverlib/MSP430FR2xx_4xx/ecomp.c create mode 100755 driverlib/MSP430FR2xx_4xx/ecomp.h create mode 100755 driverlib/MSP430FR2xx_4xx/eusci_a_spi.c create mode 100755 driverlib/MSP430FR2xx_4xx/eusci_a_spi.h create mode 100755 driverlib/MSP430FR2xx_4xx/eusci_a_uart.c create mode 100755 driverlib/MSP430FR2xx_4xx/eusci_a_uart.h create mode 100755 driverlib/MSP430FR2xx_4xx/eusci_b_i2c.c create mode 100755 driverlib/MSP430FR2xx_4xx/eusci_b_i2c.h create mode 100755 driverlib/MSP430FR2xx_4xx/eusci_b_spi.c create mode 100755 driverlib/MSP430FR2xx_4xx/eusci_b_spi.h create mode 100755 driverlib/MSP430FR2xx_4xx/framctl.c create mode 100755 driverlib/MSP430FR2xx_4xx/framctl.h create mode 100755 driverlib/MSP430FR2xx_4xx/gpio.c create mode 100755 driverlib/MSP430FR2xx_4xx/gpio.h create mode 100755 driverlib/MSP430FR2xx_4xx/icc.c create mode 100755 driverlib/MSP430FR2xx_4xx/icc.h create mode 100755 driverlib/MSP430FR2xx_4xx/inc/hw_memmap.h rename callbacks_JSON.c => driverlib/MSP430FR2xx_4xx/inc/version.h (67%) create mode 100755 driverlib/MSP430FR2xx_4xx/lcd_e.c create mode 100755 driverlib/MSP430FR2xx_4xx/lcd_e.h create mode 100755 driverlib/MSP430FR2xx_4xx/mpy32.c create mode 100755 driverlib/MSP430FR2xx_4xx/mpy32.h create mode 100755 driverlib/MSP430FR2xx_4xx/pmm.c create mode 100755 driverlib/MSP430FR2xx_4xx/pmm.h rename include/Config_Common.h => driverlib/MSP430FR2xx_4xx/rom_driverlib.h (58%) create mode 100755 driverlib/MSP430FR2xx_4xx/rom_headers/rom_driverlib_fr235x.h create mode 100755 driverlib/MSP430FR2xx_4xx/rom_headers/rom_driverlib_fr253x_fr263x.h create mode 100755 driverlib/MSP430FR2xx_4xx/rom_map_driverlib.h create mode 100755 driverlib/MSP430FR2xx_4xx/rtc.c create mode 100755 driverlib/MSP430FR2xx_4xx/rtc.h create mode 100755 driverlib/MSP430FR2xx_4xx/sac.c create mode 100755 driverlib/MSP430FR2xx_4xx/sac.h create mode 100755 driverlib/MSP430FR2xx_4xx/sfr.c create mode 100755 driverlib/MSP430FR2xx_4xx/sfr.h create mode 100755 driverlib/MSP430FR2xx_4xx/sysctl.c create mode 100755 driverlib/MSP430FR2xx_4xx/sysctl.h rename src/MSP430_HAL/HAL_Timer_FR235x.c => driverlib/MSP430FR2xx_4xx/tia.c (55%) create mode 100755 driverlib/MSP430FR2xx_4xx/tia.h create mode 100755 driverlib/MSP430FR2xx_4xx/timer_a.c create mode 100755 driverlib/MSP430FR2xx_4xx/timer_a.h create mode 100755 driverlib/MSP430FR2xx_4xx/timer_b.c create mode 100755 driverlib/MSP430FR2xx_4xx/timer_b.h create mode 100755 driverlib/MSP430FR2xx_4xx/tlv.c create mode 100755 driverlib/MSP430FR2xx_4xx/tlv.h create mode 100755 driverlib/MSP430FR2xx_4xx/wdt_a.c create mode 100755 driverlib/MSP430FR2xx_4xx/wdt_a.h create mode 100644 i2c_lcd.c create mode 100644 i2c_lcd.h delete mode 100755 include/GUI_JSON.h rename {src/MSP430_GUI/jsmn => jsmn}/jsmn.c (97%) rename {src/MSP430_GUI/jsmn => jsmn}/jsmn.h (96%) create mode 100644 keypad.c create mode 100644 keypad.h create mode 100644 keypad.patch create mode 100644 morse.c create mode 100644 morse.h delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/IQmathLib.a delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/IQmathLib_CCS_MPY32_5xx_6xx_CPUX_large_code_large_data.lib delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/IQmathLib_CCS_MPY32_5xx_6xx_CPUX_large_code_restricted_data.lib delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/IQmathLib_CCS_MPY32_5xx_6xx_CPUX_large_code_small_data.lib delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/IQmathLib_CCS_MPY32_5xx_6xx_CPUX_small_code_small_data.lib delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/QmathLib.a delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/QmathLib_CCS_MPY32_5xx_6xx_CPUX_large_code_large_data.lib delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/QmathLib_CCS_MPY32_5xx_6xx_CPUX_large_code_restricted_data.lib delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/QmathLib_CCS_MPY32_5xx_6xx_CPUX_large_code_small_data.lib delete mode 100755 src/IQMathLib/CCS/MPY32/5xx_6xx/QmathLib_CCS_MPY32_5xx_6xx_CPUX_small_code_small_data.lib delete mode 100755 src/MSP430_GUI/GUI_JSON.c delete mode 100755 src/MSP430_HAL/HAL_Config_Private.h delete mode 100755 src/MSP430_HAL/HAL_GUIComm_UART_FR235x.c delete mode 100755 src/MSP430_HAL/HAL_IO_FR235x.c delete mode 100755 src/MSP430_HAL/HAL_System_FR235x.c diff --git a/.ccsproject b/.ccsproject index 492a9bd..d96291f 100644 --- a/.ccsproject +++ b/.ccsproject @@ -2,13 +2,13 @@ - + - + - - + + diff --git a/.clangd b/.clangd index 8c4daa2..8b17bdc 100644 --- a/.clangd +++ b/.clangd @@ -6,6 +6,3 @@ CompileFlags: Diagnostics: Suppress: '*' -InlayHints: - Enabled: No - diff --git a/.cproject b/.cproject index 9f0265b..827a8d3 100644 --- a/.cproject +++ b/.cproject @@ -1,8 +1,8 @@ - - + + @@ -10,10 +10,10 @@ - - - - - - + + @@ -103,10 +108,10 @@ - - - - - + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5210d4a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +html/ +latex/ +doxygen.pdf +Debug/ diff --git a/.project b/.project index ec5c800..bd7a0e3 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - ESR-G11 + ESR-11 diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..31af992 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +encoding//Debug/driverlib/MSP430FR2xx_4xx/subdir_rules.mk=UTF-8 +encoding//Debug/driverlib/MSP430FR2xx_4xx/subdir_vars.mk=UTF-8 +encoding//Debug/jsmn/subdir_rules.mk=UTF-8 +encoding//Debug/jsmn/subdir_vars.mk=UTF-8 +encoding//Debug/makefile=UTF-8 +encoding//Debug/objects.mk=UTF-8 +encoding//Debug/sources.mk=UTF-8 +encoding//Debug/subdir_rules.mk=UTF-8 +encoding//Debug/subdir_vars.mk=UTF-8 diff --git a/Debug/.clangd/compile_commands.json b/Debug/.clangd/compile_commands.json index 313878c..57ae898 100644 --- a/Debug/.clangd/compile_commands.json +++ b/Debug/.clangd/compile_commands.json @@ -1,47 +1,142 @@ [ { - "directory" : "/home/frederik/workspace_ccstheia/ESR-G11/Debug", - "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-G11\" -I\"/home/frederik/workspace_ccstheia/ESR-G11/include\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -D__ENABLE_GUI_COMM=1 -DGLOBAL_Q=8", - "file" : "/home/frederik/workspace_ccstheia/ESR-G11/GUIComm_JSON.c" + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/adc.c" }, { - "directory" : "/home/frederik/workspace_ccstheia/ESR-G11/Debug", - "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-G11\" -I\"/home/frederik/workspace_ccstheia/ESR-G11/include\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -D__ENABLE_GUI_COMM=1 -DGLOBAL_Q=8", - "file" : "/home/frederik/workspace_ccstheia/ESR-G11/callbacks_JSON.c" + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/crc.c" }, { - "directory" : "/home/frederik/workspace_ccstheia/ESR-G11/Debug", - "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-G11\" -I\"/home/frederik/workspace_ccstheia/ESR-G11/include\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -D__ENABLE_GUI_COMM=1 -DGLOBAL_Q=8", - "file" : "/home/frederik/workspace_ccstheia/ESR-G11/main.c" + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/cs.c" }, { - "directory" : "/home/frederik/workspace_ccstheia/ESR-G11/Debug", - "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-G11\" -I\"/home/frederik/workspace_ccstheia/ESR-G11/include\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -D__ENABLE_GUI_COMM=1 -DGLOBAL_Q=8", - "file" : "/home/frederik/workspace_ccstheia/ESR-G11/src/MSP430_GUI/GUI_JSON.c" + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/ecomp.c" }, { - "directory" : "/home/frederik/workspace_ccstheia/ESR-G11/Debug", - "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-G11\" -I\"/home/frederik/workspace_ccstheia/ESR-G11/include\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -D__ENABLE_GUI_COMM=1 -DGLOBAL_Q=8", - "file" : "/home/frederik/workspace_ccstheia/ESR-G11/src/MSP430_GUI/jsmn/jsmn.c" + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/eusci_a_spi.c" }, { - "directory" : "/home/frederik/workspace_ccstheia/ESR-G11/Debug", - "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-G11\" -I\"/home/frederik/workspace_ccstheia/ESR-G11/include\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -D__ENABLE_GUI_COMM=1 -DGLOBAL_Q=8", - "file" : "/home/frederik/workspace_ccstheia/ESR-G11/src/MSP430_HAL/HAL_GUIComm_UART_FR235x.c" + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/eusci_a_uart.c" }, { - "directory" : "/home/frederik/workspace_ccstheia/ESR-G11/Debug", - "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-G11\" -I\"/home/frederik/workspace_ccstheia/ESR-G11/include\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -D__ENABLE_GUI_COMM=1 -DGLOBAL_Q=8", - "file" : "/home/frederik/workspace_ccstheia/ESR-G11/src/MSP430_HAL/HAL_IO_FR235x.c" + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/eusci_b_i2c.c" }, { - "directory" : "/home/frederik/workspace_ccstheia/ESR-G11/Debug", - "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-G11\" -I\"/home/frederik/workspace_ccstheia/ESR-G11/include\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -D__ENABLE_GUI_COMM=1 -DGLOBAL_Q=8", - "file" : "/home/frederik/workspace_ccstheia/ESR-G11/src/MSP430_HAL/HAL_System_FR235x.c" + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/eusci_b_spi.c" }, { - "directory" : "/home/frederik/workspace_ccstheia/ESR-G11/Debug", - "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-G11\" -I\"/home/frederik/workspace_ccstheia/ESR-G11/include\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -D__ENABLE_GUI_COMM=1 -DGLOBAL_Q=8", - "file" : "/home/frederik/workspace_ccstheia/ESR-G11/src/MSP430_HAL/HAL_Timer_FR235x.c" + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/framctl.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/gpio.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/icc.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/lcd_e.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/mpy32.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/pmm.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/rtc.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/sac.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/sfr.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/sysctl.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/tia.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/timer_a.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/timer_b.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/tlv.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx/wdt_a.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/jsmn/jsmn.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/main.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/keypad.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/i2c_lcd.c" + }, + { + "directory" : "/home/frederik/workspace_ccstheia/ESR-11/Debug", + "command" : "clang++ -I\"/home/frederik/.ti/ccs2010/ccs/ccs_base/msp430/include\" -I\"/home/frederik/workspace_ccstheia/ESR-11\" -I\"/home/frederik/workspace_ccstheia/ESR-11/jsmn\" -I\"/home/frederik/workspace_ccstheia/ESR-11/driverlib/MSP430FR2xx_4xx\" -I\"/home/frederik/.ti/ccs2010/ccs/tools/compiler/ti-cgt-msp430_21.6.1.LTS/include\" -D__MSP430FR2355__ -D_FRWP_ENABLE -D_INFO_FRWP_ENABLE -xc", + "file" : "/home/frederik/workspace_ccstheia/ESR-11/morse.c" } ] diff --git a/GUIComm_JSON.c b/GUIComm_JSON.c deleted file mode 100755 index 8c56074..0000000 --- a/GUIComm_JSON.c +++ /dev/null @@ -1,277 +0,0 @@ -/* --COPYRIGHT--,BSD - * Copyright (c) 2020, Texas Instruments Incorporated - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * 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. - * - * * Neither the name of Texas Instruments Incorporated 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 OWNER 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. - * --/COPYRIGHT--*/ -//***************************************************************************** -// GUI Communication Layer -// -// API to communicate with GUI using JSON protocol -// Texas Instruments, Inc.** - -#include -#include -#include -#include -#include -#include - -static void itoa(int32_t value, char* result); - -static const char cmdTemplate[] = "{\"\":}\n"; -static char cATXString[20]; - -//These values are used to concatenate the command and data to the command template -// when using the GUIComm_send functions -#define CMD_INDEX 1 -#define DATA_INDEX 3 -#define CMD_TEMPLATE_LENGTH 6 -#define BASE 10 - - -//! \brief Converts a number into a string -//! -//! \return none -void itoa(int32_t value, char* result) -{ - char* ptr = result, *ptr1 = result, tmp_char; - uint32_t tmp_value; - - tmp_value = labs(value); - do { - *ptr++ = "0123456789" [tmp_value%BASE]; - tmp_value /= BASE; - } while (tmp_value); - - // Apply negative sign - if (value < 0) *ptr++ = '-'; - *ptr-- = '\0'; - while(ptr1 < ptr) { - tmp_char = *ptr; - *ptr--= *ptr1; - *ptr1++ = tmp_char; - } -} - -int GUIComm_sendUInt(char *cmd, uint8_t cmdLength, uint32_t val) -{ - uint8_t i; - - for (i = 0; i < CMD_TEMPLATE_LENGTH; i++) - { - HAL_GUI_TransmitCharBlocking(cmdTemplate[i]); - if (i == CMD_INDEX) - { - GUI_TransmitStringBlocking(cmd); - } - else if (i == DATA_INDEX) - { - itoa(val, cATXString); - GUI_TransmitStringBlocking(cATXString); - } - } - - return 0; -} - -int GUIComm_sendInt(char *cmd, uint8_t cmdLength, uint32_t val) -{ - uint8_t i; - - for (i = 0; i < CMD_TEMPLATE_LENGTH; i++) - { - HAL_GUI_TransmitCharBlocking(cmdTemplate[i]); - if (i == CMD_INDEX) - { - GUI_TransmitStringBlocking(cmd); - } - else if (i == DATA_INDEX) - { - itoa(val, cATXString); - GUI_TransmitStringBlocking(cATXString); - } - } - - return 0; -} - -int GUIComm_sendUInt8(char *cmd, uint8_t cmdLength, uint8_t val) -{ - uint8_t i; - - for (i = 0; i < CMD_TEMPLATE_LENGTH; i++) - { - HAL_GUI_TransmitCharBlocking(cmdTemplate[i]); - if (i == CMD_INDEX) - { - GUI_TransmitStringBlocking(cmd); - } - else if (i == DATA_INDEX) - { - - itoa(val, cATXString); - GUI_TransmitStringBlocking(cATXString); - } - } - - return 0; -} - -int GUIComm_sendInt8(char *cmd, uint8_t cmdLength, int8_t val) -{ - uint8_t i; - - for (i = 0; i < CMD_TEMPLATE_LENGTH; i++) - { - HAL_GUI_TransmitCharBlocking(cmdTemplate[i]); - if (i == CMD_INDEX) - { - GUI_TransmitStringBlocking(cmd); - } - else if (i == DATA_INDEX) - { - itoa(val, cATXString); - GUI_TransmitStringBlocking(cATXString); - } - } - - return 0; -} - -int GUIComm_sendInt16(char *cmd, uint8_t cmdLength, int16_t val) -{ - uint8_t i; - - for (i = 0; i < CMD_TEMPLATE_LENGTH; i++) - { - HAL_GUI_TransmitCharBlocking(cmdTemplate[i]); - if (i == CMD_INDEX) - { - GUI_TransmitStringBlocking(cmd); - } - else if (i == DATA_INDEX) - { - itoa(val, cATXString); - GUI_TransmitStringBlocking(cATXString); - } - } - - return 0; -} - -int GUIComm_sendUInt16(char *cmd, uint8_t cmdLength, uint16_t val) -{ - uint8_t i; - - for (i = 0; i < CMD_TEMPLATE_LENGTH; i++) - { - HAL_GUI_TransmitCharBlocking(cmdTemplate[i]); - if (i == CMD_INDEX) - { - GUI_TransmitStringBlocking(cmd); - } - else if (i == DATA_INDEX) - { - itoa(val, cATXString); - GUI_TransmitStringBlocking(cATXString); - } - } - - return 0; -} - -int GUIComm_sendUInt32(char *cmd, uint8_t cmdLength, uint32_t val) -{ - uint8_t i; - - for (i = 0; i < CMD_TEMPLATE_LENGTH; i++) - { - HAL_GUI_TransmitCharBlocking(cmdTemplate[i]); - if (i == CMD_INDEX) - { - GUI_TransmitStringBlocking(cmd); - } - else if (i == DATA_INDEX) - { - itoa(val, cATXString); - GUI_TransmitStringBlocking(cATXString); - } - } - - return 0; -} - -int GUIComm_sendInt32(char *cmd, uint8_t cmdLength, int32_t val) -{ - uint8_t i; - - for (i = 0; i < CMD_TEMPLATE_LENGTH; i++) - { - HAL_GUI_TransmitCharBlocking(cmdTemplate[i]); - if (i == CMD_INDEX) - { - GUI_TransmitStringBlocking(cmd); - } - else if (i == DATA_INDEX) - { - itoa(val, cATXString); - GUI_TransmitStringBlocking(cATXString); - } - } - - return 0; -} - -int GUIComm_sendBool(char *cmd, uint8_t cmdLength, bool val) -{ - uint16_t i; - - for (i = 0; i < CMD_TEMPLATE_LENGTH; i++) - { - HAL_GUI_TransmitCharBlocking(cmdTemplate[i]); - if (i == CMD_INDEX) - { - GUI_TransmitStringBlocking(cmd); - } - else if (i == DATA_INDEX) - { - if (val == true) - { - GUI_TransmitStringBlocking("true"); - } - else - { - GUI_TransmitStringBlocking("false"); - } - } - } - - return 0; -} - diff --git a/Include/GUIComm.h b/Include/GUIComm.h deleted file mode 100755 index 033b517..0000000 --- a/Include/GUIComm.h +++ /dev/null @@ -1,101 +0,0 @@ -/* --COPYRIGHT--,BSD - * Copyright (c) 2020, Texas Instruments Incorporated - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * 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. - * - * * Neither the name of Texas Instruments Incorporated 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 OWNER 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. - * --/COPYRIGHT--*/ -//***************************************************************************** -// Generic GUI Demo using MSP430 -// -// API to communicate with GUI and abstract transport layer protocol -// Texas Instruments, Inc. -// ****************************************************************************** - -#ifndef INCLUDE_GUICOMM_H_ -#define INCLUDE_GUICOMM_H_ - -//! ***** Functions to send data to GUI ***** - -//! \brief Sends a 32-bit integer. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendInt(char *cmd, uint8_t cmdLength, uint32_t val); - -//! \brief Sends a 32-bit unsigned integer. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendUInt(char *cmd, uint8_t cmdLength, uint32_t val); - -//! \brief Sends an uint8_t value to the GUI. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendUInt8(char *cmd, uint8_t cmdLength, uint8_t val); - -//! \brief Sends an int8_t value to the GUI. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendInt8(char *cmd, uint8_t cmdLength, int8_t val); - -//! \brief Sends an uint16_t value to the GUI. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendUInt16(char *cmd, uint8_t cmdLength, uint16_t val); - -//! \brief Sends an int16_t value to the GUI. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendInt16(char *cmd, uint8_t cmdLength, int16_t val); - -//! \brief Sends an uint32_t value to the GUI. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendUInt32(char *cmd, uint8_t cmdLength, uint32_t val); - -//! \brief Sends an int32_t value to the GUI. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendInt32(char *cmd, uint8_t cmdLength, int32_t val); - -//! \brief Sends an uint32_t value to the GUI. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendUInt64(char *cmd, uint8_t cmdLength, uint64_t val); - -//! \brief Sends an int32_t value to the GUI. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendInt64(char *cmd, uint8_t cmdLength, int64_t val); - -//! \brief Sends a bool value to the GUI. -//! -//! \return 0 if success, -1 if failure -extern int GUIComm_sendBool(char *cmd, uint8_t cmdLength, bool val); - - - -#endif /* INCLUDE_GUICOMM_H_ */ diff --git a/Include/HAL.h b/Include/HAL.h deleted file mode 100755 index 791cd15..0000000 --- a/Include/HAL.h +++ /dev/null @@ -1,101 +0,0 @@ -/* --COPYRIGHT--,BSD - * Copyright (c) 2019, Texas Instruments Incorporated - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * 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. - * - * * Neither the name of Texas Instruments Incorporated 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 OWNER 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. - * --/COPYRIGHT--*/ -//***************************************************************************** -// MSP430 HAL -// -// Hardware Abstraction Layer for MSP430 -// -// Texas Instruments, Inc. - -#ifndef __HAL_H__ -#define __HAL_H__ - -#include -#include -#include -#include -#include - -//! \brief GUI Comm RX Callback function pointer -//! -//! \param[in] char with Received byte -//! -//! \return true if device wakes-up after ISR, false if not. -typedef bool (*tGUICommRXCharCallback)(char ); - -// ********************* System ************************************************ -//! \brief Initializes I/Os used by the system. -//! Initialization is done to achieve lowest power consumption. -//! -//! -//! \return 0 if OK, -1 if error -extern int8_t HAL_System_Init(void); - -// ********************* I/O *************************************************** -//! \brief Initializes I/Os used by the system. -//! Initialization is done to achieve lowest power consumption. -//! -//! -//! \return none -extern void HAL_IO_Init(void); - -//! \brief Initializes inputs used for push-buttons -//! Pins are initialized with pull-ups and interrupts are enabled. -//! -//! -//! \return none -extern void HAL_IO_InitButtons(void); - -// ********************* Timer *************************************************** -//! \brief Initializes a simple periodic interrupt timer. -//! Timer is initialized using Low-frequency clock and interrupts -//! are enabled. -//! -//! \return none -extern void HAL_Timer_Init(void); - -// ********************* GUI Communication ************************************* -//! \brief Initializes the communication interface for GUI. -//! -//! \param[in] RxByteCallback is the function called when a byte is received. -//! -//! \return none -extern void HAL_GUI_Init(tGUICommRXCharCallback RxByteCallback); - -//! \brief Transmits a character to the GUI in blocking mode. -//! -//! \param[in] character is the character being transmitted to GUI. -//! -//! \return none -extern void HAL_GUI_TransmitCharBlocking(char character); - -#endif //__HAL_H__ diff --git a/Include/IQmathLib.h b/Include/IQmathLib.h deleted file mode 100755 index cfc5b50..0000000 --- a/Include/IQmathLib.h +++ /dev/null @@ -1,3967 +0,0 @@ -/* --COPYRIGHT--,BSD - * Copyright (c) 2015, Texas Instruments Incorporated - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * 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. - * - * * Neither the name of Texas Instruments Incorporated 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 OWNER 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. - * --/COPYRIGHT--*/ -#ifndef __IQMATHLIB_H__ -#define __IQMATHLIB_H__ - -//***************************************************************************** -// -// If building with a C++ compiler, make all of the definitions in this header -// have a C binding. -// -//***************************************************************************** -#ifdef __cplusplus -extern "C" -{ -#endif - -//***************************************************************************** -// -// The IQ format to be used when the IQ format is not explicitly specified -// (such as _IQcos instead of _IQ16cos). This value must be between 1 and 30, -// inclusive. -// -//***************************************************************************** -#ifndef GLOBAL_IQ -#define GLOBAL_IQ 24 -#endif - -//***************************************************************************** -// -// Include some standard headers. -// -//***************************************************************************** -#include -#include -#include - -//***************************************************************************** -// -// Various Useful Constant Definitions: -// -//***************************************************************************** -#define Q30 30 -#define Q29 29 -#define Q28 28 -#define Q27 27 -#define Q26 26 -#define Q25 25 -#define Q24 24 -#define Q23 23 -#define Q22 22 -#define Q21 21 -#define Q20 20 -#define Q19 19 -#define Q18 18 -#define Q17 17 -#define Q16 16 -#define Q15 15 -#define Q14 14 -#define Q13 13 -#define Q12 12 -#define Q11 11 -#define Q10 10 -#define Q9 9 -#define Q8 8 -#define Q7 7 -#define Q6 6 -#define Q5 5 -#define Q4 4 -#define Q3 3 -#define Q2 2 -#define Q1 1 -#ifndef QG -#define QG GLOBAL_IQ -#endif - -#define MAX_IQ_POS LONG_MAX -#define MAX_IQ_NEG LONG_MIN -#define MIN_IQ_POS 1 -#define MIN_IQ_NEG -1 - -//***************************************************************************** -// -// The types for the various IQ formats. -// -//***************************************************************************** -typedef int32_t _iq30; -typedef int32_t _iq29; -typedef int32_t _iq28; -typedef int32_t _iq27; -typedef int32_t _iq26; -typedef int32_t _iq25; -typedef int32_t _iq24; -typedef int32_t _iq23; -typedef int32_t _iq22; -typedef int32_t _iq21; -typedef int32_t _iq20; -typedef int32_t _iq19; -typedef int32_t _iq18; -typedef int32_t _iq17; -typedef int32_t _iq16; -typedef int32_t _iq15; -typedef int32_t _iq14; -typedef int32_t _iq13; -typedef int32_t _iq12; -typedef int32_t _iq11; -typedef int32_t _iq10; -typedef int32_t _iq9; -typedef int32_t _iq8; -typedef int32_t _iq7; -typedef int32_t _iq6; -typedef int32_t _iq5; -typedef int32_t _iq4; -typedef int32_t _iq3; -typedef int32_t _iq2; -typedef int32_t _iq1; -typedef int32_t _iq; - -//***************************************************************************** -// -// Simple multiplies or divides, which are accomplished with simple shifts. -// -//***************************************************************************** -#define _IQmpy2(A) ((A) << 1) -#define _IQmpy4(A) ((A) << 2) -#define _IQmpy8(A) ((A) << 3) -#define _IQmpy16(A) ((A) << 4) -#define _IQmpy32(A) ((A) << 5) -#define _IQmpy64(A) ((A) << 6) -#define _IQdiv2(A) ((A) >> 1) -#define _IQdiv4(A) ((A) >> 2) -#define _IQdiv8(A) ((A) >> 3) -#define _IQdiv16(A) ((A) >> 4) -#define _IQdiv32(A) ((A) >> 5) -#define _IQdiv64(A) ((A) >> 6) - -//***************************************************************************** -// -// Convert a value into an IQ number. -// -//***************************************************************************** -#define _IQ30(A) ((_iq30)((A) * ((_iq30)1 << 30))) -#define _IQ29(A) ((_iq29)((A) * ((_iq29)1 << 29))) -#define _IQ28(A) ((_iq28)((A) * ((_iq28)1 << 28))) -#define _IQ27(A) ((_iq27)((A) * ((_iq27)1 << 27))) -#define _IQ26(A) ((_iq26)((A) * ((_iq26)1 << 26))) -#define _IQ25(A) ((_iq25)((A) * ((_iq25)1 << 25))) -#define _IQ24(A) ((_iq24)((A) * ((_iq24)1 << 24))) -#define _IQ23(A) ((_iq23)((A) * ((_iq23)1 << 23))) -#define _IQ22(A) ((_iq22)((A) * ((_iq22)1 << 22))) -#define _IQ21(A) ((_iq21)((A) * ((_iq21)1 << 21))) -#define _IQ20(A) ((_iq20)((A) * ((_iq20)1 << 20))) -#define _IQ19(A) ((_iq19)((A) * ((_iq19)1 << 19))) -#define _IQ18(A) ((_iq18)((A) * ((_iq18)1 << 18))) -#define _IQ17(A) ((_iq17)((A) * ((_iq17)1 << 17))) -#define _IQ16(A) ((_iq16)((A) * ((_iq16)1 << 16))) -#define _IQ15(A) ((_iq15)((A) * ((_iq15)1 << 15))) -#define _IQ14(A) ((_iq14)((A) * ((_iq14)1 << 14))) -#define _IQ13(A) ((_iq13)((A) * ((_iq13)1 << 13))) -#define _IQ12(A) ((_iq12)((A) * ((_iq12)1 << 12))) -#define _IQ11(A) ((_iq11)((A) * ((_iq11)1 << 11))) -#define _IQ10(A) ((_iq10)((A) * ((_iq10)1 << 10))) -#define _IQ9(A) ((_iq9)((A) * ((_iq9)1 << 9))) -#define _IQ8(A) ((_iq8)((A) * ((_iq8)1 << 8))) -#define _IQ7(A) ((_iq7)((A) * ((_iq7)1 << 7))) -#define _IQ6(A) ((_iq6)((A) * ((_iq6)1 << 6))) -#define _IQ5(A) ((_iq5)((A) * ((_iq5)1 << 5))) -#define _IQ4(A) ((_iq4)((A) * ((_iq4)1 << 4))) -#define _IQ3(A) ((_iq3)((A) * ((_iq3)1 << 3))) -#define _IQ2(A) ((_iq2)((A) * ((_iq2)1 << 2))) -#define _IQ1(A) ((_iq1)((A) * ((_iq1)1 << 1))) - -#if GLOBAL_IQ == 30 -#define _IQ(A) _IQ30(A) -#endif -#if GLOBAL_IQ == 29 -#define _IQ(A) _IQ29(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQ(A) _IQ28(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQ(A) _IQ27(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQ(A) _IQ26(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQ(A) _IQ25(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQ(A) _IQ24(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQ(A) _IQ23(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQ(A) _IQ22(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQ(A) _IQ21(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQ(A) _IQ20(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQ(A) _IQ19(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQ(A) _IQ18(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQ(A) _IQ17(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQ(A) _IQ16(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQ(A) _IQ15(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQ(A) _IQ14(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQ(A) _IQ13(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQ(A) _IQ12(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQ(A) _IQ11(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQ(A) _IQ10(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQ(A) _IQ9(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQ(A) _IQ8(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQ(A) _IQ7(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQ(A) _IQ6(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQ(A) _IQ5(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQ(A) _IQ4(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQ(A) _IQ3(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQ(A) _IQ2(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQ(A) _IQ1(A) -#endif - -//***************************************************************************** -// -// Convert an IQ number to a floating point value. -// -//***************************************************************************** -extern float _IQ30toF(_iq30 A); -extern float _IQ29toF(_iq29 A); -extern float _IQ28toF(_iq28 A); -extern float _IQ27toF(_iq27 A); -extern float _IQ26toF(_iq26 A); -extern float _IQ25toF(_iq25 A); -extern float _IQ24toF(_iq24 A); -extern float _IQ23toF(_iq23 A); -extern float _IQ22toF(_iq22 A); -extern float _IQ21toF(_iq21 A); -extern float _IQ20toF(_iq20 A); -extern float _IQ19toF(_iq19 A); -extern float _IQ18toF(_iq18 A); -extern float _IQ17toF(_iq17 A); -extern float _IQ16toF(_iq16 A); -extern float _IQ15toF(_iq15 A); -extern float _IQ14toF(_iq14 A); -extern float _IQ13toF(_iq13 A); -extern float _IQ12toF(_iq12 A); -extern float _IQ11toF(_iq11 A); -extern float _IQ10toF(_iq10 A); -extern float _IQ9toF(_iq9 A); -extern float _IQ8toF(_iq8 A); -extern float _IQ7toF(_iq7 A); -extern float _IQ6toF(_iq6 A); -extern float _IQ5toF(_iq5 A); -extern float _IQ4toF(_iq4 A); -extern float _IQ3toF(_iq3 A); -extern float _IQ2toF(_iq2 A); -extern float _IQ1toF(_iq1 A); - -#if GLOBAL_IQ == 30 -#define _IQtoF(A) _IQ30toF(A) -#endif -#if GLOBAL_IQ == 29 -#define _IQtoF(A) _IQ29toF(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQtoF(A) _IQ28toF(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQtoF(A) _IQ27toF(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQtoF(A) _IQ26toF(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQtoF(A) _IQ25toF(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQtoF(A) _IQ24toF(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQtoF(A) _IQ23toF(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQtoF(A) _IQ22toF(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQtoF(A) _IQ21toF(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQtoF(A) _IQ20toF(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQtoF(A) _IQ19toF(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQtoF(A) _IQ18toF(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQtoF(A) _IQ17toF(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQtoF(A) _IQ16toF(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQtoF(A) _IQ15toF(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQtoF(A) _IQ14toF(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQtoF(A) _IQ13toF(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQtoF(A) _IQ12toF(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQtoF(A) _IQ11toF(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQtoF(A) _IQ10toF(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQtoF(A) _IQ9toF(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQtoF(A) _IQ8toF(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQtoF(A) _IQ7toF(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQtoF(A) _IQ6toF(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQtoF(A) _IQ5toF(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQtoF(A) _IQ4toF(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQtoF(A) _IQ3toF(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQtoF(A) _IQ2toF(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQtoF(A) _IQ1toF(A) -#endif - -//***************************************************************************** -// -// Saturates an IQ number in a given range. -// -//***************************************************************************** -#define _IQsat(A, Pos, Neg) (((A) > (Pos)) ? \ - (Pos) : \ - (((A) < (Neg)) ? (Neg) : (A))) - -//***************************************************************************** -// -// Converts an IQ number between the global IQ format and a specified IQ -// format. -// -//***************************************************************************** -#define _IQtoIQ30(A) ((_iq30)(A) << (30 - GLOBAL_IQ)) -#define _IQ30toIQ(A) ((_iq30)(A) >> (30 - GLOBAL_IQ)) - -#if (GLOBAL_IQ >= 29) -#define _IQtoIQ29(A) ((_iq29)(A) >> (GLOBAL_IQ - 29)) -#define _IQ29toIQ(A) ((_iq29)(A) << (GLOBAL_IQ - 29)) -#else -#define _IQtoIQ29(A) ((_iq29)(A) << (29 - GLOBAL_IQ)) -#define _IQ29toIQ(A) ((_iq29)(A) >> (29 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 28) -#define _IQtoIQ28(A) ((_iq28)(A) >> (GLOBAL_IQ - 28)) -#define _IQ28toIQ(A) ((_iq28)(A) << (GLOBAL_IQ - 28)) -#else -#define _IQtoIQ28(A) ((_iq28)(A) << (28 - GLOBAL_IQ)) -#define _IQ28toIQ(A) ((_iq28)(A) >> (28 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 27) -#define _IQtoIQ27(A) ((_iq27)(A) >> (GLOBAL_IQ - 27)) -#define _IQ27toIQ(A) ((_iq27)(A) << (GLOBAL_IQ - 27)) -#else -#define _IQtoIQ27(A) ((_iq27)(A) << (27 - GLOBAL_IQ)) -#define _IQ27toIQ(A) ((_iq27)(A) >> (27 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 26) -#define _IQtoIQ26(A) ((_iq26)(A) >> (GLOBAL_IQ - 26)) -#define _IQ26toIQ(A) ((_iq26)(A) << (GLOBAL_IQ - 26)) -#else -#define _IQtoIQ26(A) ((_iq26)(A) << (26 - GLOBAL_IQ)) -#define _IQ26toIQ(A) ((_iq26)(A) >> (26 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 25) -#define _IQtoIQ25(A) ((_iq25)(A) >> (GLOBAL_IQ - 25)) -#define _IQ25toIQ(A) ((_iq25)(A) << (GLOBAL_IQ - 25)) -#else -#define _IQtoIQ25(A) ((_iq25)(A) << (25 - GLOBAL_IQ)) -#define _IQ25toIQ(A) ((_iq25)(A) >> (25 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 24) -#define _IQtoIQ24(A) ((_iq24)(A) >> (GLOBAL_IQ - 24)) -#define _IQ24toIQ(A) ((_iq24)(A) << (GLOBAL_IQ - 24)) -#else -#define _IQtoIQ24(A) ((_iq24)(A) << (24 - GLOBAL_IQ)) -#define _IQ24toIQ(A) ((_iq24)(A) >> (24 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 23) -#define _IQtoIQ23(A) ((_iq23)(A) >> (GLOBAL_IQ - 23)) -#define _IQ23toIQ(A) ((_iq23)(A) << (GLOBAL_IQ - 23)) -#else -#define _IQtoIQ23(A) ((_iq23)(A) << (23 - GLOBAL_IQ)) -#define _IQ23toIQ(A) ((_iq23)(A) >> (23 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 22) -#define _IQtoIQ22(A) ((_iq22)(A) >> (GLOBAL_IQ - 22)) -#define _IQ22toIQ(A) ((_iq22)(A) << (GLOBAL_IQ - 22)) -#else -#define _IQtoIQ22(A) ((_iq22)(A) << (22 - GLOBAL_IQ)) -#define _IQ22toIQ(A) ((_iq22)(A) >> (22 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 21) -#define _IQtoIQ21(A) ((_iq21)(A) >> (GLOBAL_IQ - 21)) -#define _IQ21toIQ(A) ((_iq21)(A) << (GLOBAL_IQ - 21)) -#else -#define _IQtoIQ21(A) ((_iq21)(A) << (21 - GLOBAL_IQ)) -#define _IQ21toIQ(A) ((_iq21)(A) >> (21 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 20) -#define _IQtoIQ20(A) ((_iq20)(A) >> (GLOBAL_IQ - 20)) -#define _IQ20toIQ(A) ((_iq20)(A) << (GLOBAL_IQ - 20)) -#else -#define _IQtoIQ20(A) ((_iq20)(A) << (20 - GLOBAL_IQ)) -#define _IQ20toIQ(A) ((_iq20)(A) >> (20 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 19) -#define _IQtoIQ19(A) ((_iq19)(A) >> (GLOBAL_IQ - 19)) -#define _IQ19toIQ(A) ((_iq19)(A) << (GLOBAL_IQ - 19)) -#else -#define _IQtoIQ19(A) ((_iq19)(A) << (19 - GLOBAL_IQ)) -#define _IQ19toIQ(A) ((_iq19)(A) >> (19 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 18) -#define _IQtoIQ18(A) ((_iq18)(A) >> (GLOBAL_IQ - 18)) -#define _IQ18toIQ(A) ((_iq18)(A) << (GLOBAL_IQ - 18)) -#else -#define _IQtoIQ18(A) ((_iq18)(A) << (18 - GLOBAL_IQ)) -#define _IQ18toIQ(A) ((_iq18)(A) >> (18 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 17) -#define _IQtoIQ17(A) ((_iq17)(A) >> (GLOBAL_IQ - 17)) -#define _IQ17toIQ(A) ((_iq17)(A) << (GLOBAL_IQ - 17)) -#else -#define _IQtoIQ17(A) ((_iq17)(A) << (17 - GLOBAL_IQ)) -#define _IQ17toIQ(A) ((_iq17)(A) >> (17 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 16) -#define _IQtoIQ16(A) ((_iq16)(A) >> (GLOBAL_IQ - 16)) -#define _IQ16toIQ(A) ((_iq16)(A) << (GLOBAL_IQ - 16)) -#else -#define _IQtoIQ16(A) ((_iq16)(A) << (16 - GLOBAL_IQ)) -#define _IQ16toIQ(A) ((_iq16)(A) >> (16 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 15) -#define _IQtoIQ15(A) ((_iq15)(A) >> (GLOBAL_IQ - 15)) -#define _IQ15toIQ(A) ((_iq15)(A) << (GLOBAL_IQ - 15)) -#else -#define _IQtoIQ15(A) ((_iq15)(A) << (15 - GLOBAL_IQ)) -#define _IQ15toIQ(A) ((_iq15)(A) >> (15 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 14) -#define _IQtoIQ14(A) ((_iq14)(A) >> (GLOBAL_IQ - 14)) -#define _IQ14toIQ(A) ((_iq14)(A) << (GLOBAL_IQ - 14)) -#else -#define _IQtoIQ14(A) ((_iq14)(A) << (14 - GLOBAL_IQ)) -#define _IQ14toIQ(A) ((_iq14)(A) >> (14 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 13) -#define _IQtoIQ13(A) ((_iq13)(A) >> (GLOBAL_IQ - 13)) -#define _IQ13toIQ(A) ((_iq13)(A) << (GLOBAL_IQ - 13)) -#else -#define _IQtoIQ13(A) ((_iq13)(A) << (13 - GLOBAL_IQ)) -#define _IQ13toIQ(A) ((_iq13)(A) >> (13 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 12) -#define _IQtoIQ12(A) ((_iq12)(A) >> (GLOBAL_IQ - 12)) -#define _IQ12toIQ(A) ((_iq12)(A) << (GLOBAL_IQ - 12)) -#else -#define _IQtoIQ12(A) ((_iq12)(A) << (12 - GLOBAL_IQ)) -#define _IQ12toIQ(A) ((_iq12)(A) >> (12 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 11) -#define _IQtoIQ11(A) ((_iq11)(A) >> (GLOBAL_IQ - 11)) -#define _IQ11toIQ(A) ((_iq11)(A) << (GLOBAL_IQ - 11)) -#else -#define _IQtoIQ11(A) ((_iq11)(A) << (11 - GLOBAL_IQ)) -#define _IQ11toIQ(A) ((_iq11)(A) >> (11 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 10) -#define _IQtoIQ10(A) ((_iq10)(A) >> (GLOBAL_IQ - 10)) -#define _IQ10toIQ(A) ((_iq10)(A) << (GLOBAL_IQ - 10)) -#else -#define _IQtoIQ10(A) ((_iq10)(A) << (10 - GLOBAL_IQ)) -#define _IQ10toIQ(A) ((_iq10)(A) >> (10 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 9) -#define _IQtoIQ9(A) ((_iq9)(A) >> (GLOBAL_IQ - 9)) -#define _IQ9toIQ(A) ((_iq9)(A) << (GLOBAL_IQ - 9)) -#else -#define _IQtoIQ9(A) ((_iq9)(A) << (9 - GLOBAL_IQ)) -#define _IQ9toIQ(A) ((_iq9)(A) >> (9 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 8) -#define _IQtoIQ8(A) ((_iq8)(A) >> (GLOBAL_IQ - 8)) -#define _IQ8toIQ(A) ((_iq8)(A) << (GLOBAL_IQ - 8)) -#else -#define _IQtoIQ8(A) ((_iq8)(A) << (8 - GLOBAL_IQ)) -#define _IQ8toIQ(A) ((_iq8)(A) >> (8 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 7) -#define _IQtoIQ7(A) ((_iq7)(A) >> (GLOBAL_IQ - 7)) -#define _IQ7toIQ(A) ((_iq7)(A) << (GLOBAL_IQ - 7)) -#else -#define _IQtoIQ7(A) ((_iq7)(A) << (7 - GLOBAL_IQ)) -#define _IQ7toIQ(A) ((_iq7)(A) >> (7 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 6) -#define _IQtoIQ6(A) ((_iq6)(A) >> (GLOBAL_IQ - 6)) -#define _IQ6toIQ(A) ((_iq6)(A) << (GLOBAL_IQ - 6)) -#else -#define _IQtoIQ6(A) ((_iq6)(A) << (6 - GLOBAL_IQ)) -#define _IQ6toIQ(A) ((_iq6)(A) >> (6 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 5) -#define _IQtoIQ5(A) ((_iq5)(A) >> (GLOBAL_IQ - 5)) -#define _IQ5toIQ(A) ((_iq5)(A) << (GLOBAL_IQ - 5)) -#else -#define _IQtoIQ5(A) ((_iq5)(A) << (5 - GLOBAL_IQ)) -#define _IQ5toIQ(A) ((_iq5)(A) >> (5 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 4) -#define _IQtoIQ4(A) ((_iq4)(A) >> (GLOBAL_IQ - 4)) -#define _IQ4toIQ(A) ((_iq4)(A) << (GLOBAL_IQ - 4)) -#else -#define _IQtoIQ4(A) ((_iq4)(A) << (4 - GLOBAL_IQ)) -#define _IQ4toIQ(A) ((_iq4)(A) >> (4 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 3) -#define _IQtoIQ3(A) ((_iq3)(A) >> (GLOBAL_IQ - 3)) -#define _IQ3toIQ(A) ((_iq3)(A) << (GLOBAL_IQ - 3)) -#else -#define _IQtoIQ3(A) ((_iq3)(A) << (3 - GLOBAL_IQ)) -#define _IQ3toIQ(A) ((_iq3)(A) >> (3 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 2) -#define _IQtoIQ2(A) ((_iq2)(A) >> (GLOBAL_IQ - 2)) -#define _IQ2toIQ(A) ((_iq2)(A) << (GLOBAL_IQ - 2)) -#else -#define _IQtoIQ2(A) ((_iq2)(A) << (2 - GLOBAL_IQ)) -#define _IQ2toIQ(A) ((_iq2)(A) >> (2 - GLOBAL_IQ)) -#endif - -#define _IQtoIQ1(A) ((_iq1)(A) >> (GLOBAL_IQ - 1)) -#define _IQ1toIQ(A) ((_iq1)(A) << (GLOBAL_IQ - 1)) - -//***************************************************************************** -// -// Converts a number between IQ format and 16-bit Qn format. -// -//***************************************************************************** -#if (GLOBAL_IQ >= 15) -#define _IQtoQ15(A) ((int32_t)(A) >> (GLOBAL_IQ - 15)) -#define _Q15toIQ(A) ((_iq15)(A) << (GLOBAL_IQ - 15)) -#else -#define _IQtoQ15(A) ((int32_t)(A) << (15 - GLOBAL_IQ)) -#define _Q15toIQ(A) ((_iq15)(A) >> (15 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 14) -#define _IQtoQ14(A) ((int32_t)(A) >> (GLOBAL_IQ - 14)) -#define _Q14toIQ(A) ((_iq14)(A) << (GLOBAL_IQ - 14)) -#else -#define _IQtoQ14(A) ((int32_t)(A) << (14 - GLOBAL_IQ)) -#define _Q14toIQ(A) ((_iq14)(A) >> (14 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 13) -#define _IQtoQ13(A) ((int32_t)(A) >> (GLOBAL_IQ - 13)) -#define _Q13toIQ(A) ((_iq13)(A) << (GLOBAL_IQ - 13)) -#else -#define _IQtoQ13(A) ((int32_t)(A) << (13 - GLOBAL_IQ)) -#define _Q13toIQ(A) ((_iq13)(A) >> (13 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 12) -#define _IQtoQ12(A) ((int32_t)(A) >> (GLOBAL_IQ - 12)) -#define _Q12toIQ(A) ((_iq12)(A) << (GLOBAL_IQ - 12)) -#else -#define _IQtoQ12(A) ((int32_t)(A) << (12 - GLOBAL_IQ)) -#define _Q12toIQ(A) ((_iq12)(A) >> (12 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 11) -#define _IQtoQ11(A) ((int32_t)(A) >> (GLOBAL_IQ - 11)) -#define _Q11toIQ(A) ((_iq11)(A) << (GLOBAL_IQ - 11)) -#else -#define _IQtoQ11(A) ((int32_t)(A) << (11 - GLOBAL_IQ)) -#define _Q11toIQ(A) ((_iq11)(A) >> (11 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 10) -#define _IQtoQ10(A) ((int32_t)(A) >> (GLOBAL_IQ - 10)) -#define _Q10toIQ(A) ((_iq10)(A) << (GLOBAL_IQ - 10)) -#else -#define _IQtoQ10(A) ((int32_t)(A) << (10 - GLOBAL_IQ)) -#define _Q10toIQ(A) ((_iq10)(A) >> (10 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 9) -#define _IQtoQ9(A) ((int32_t)(A) >> (GLOBAL_IQ - 9)) -#define _Q9toIQ(A) ((_iq9)(A) << (GLOBAL_IQ - 9)) -#else -#define _IQtoQ9(A) ((int32_t)(A) << (9 - GLOBAL_IQ)) -#define _Q9toIQ(A) ((_iq9)(A) >> (9 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 8) -#define _IQtoQ8(A) ((int32_t)(A) >> (GLOBAL_IQ - 8)) -#define _Q8toIQ(A) ((_iq8)(A) << (GLOBAL_IQ - 8)) -#else -#define _IQtoQ8(A) ((int32_t)(A) << (8 - GLOBAL_IQ)) -#define _Q8toIQ(A) ((_iq8)(A) >> (8 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 7) -#define _IQtoQ7(A) ((int32_t)(A) >> (GLOBAL_IQ - 7)) -#define _Q7toIQ(A) ((_iq7)(A) << (GLOBAL_IQ - 7)) -#else -#define _IQtoQ7(A) ((int32_t)(A) << (7 - GLOBAL_IQ)) -#define _Q7toIQ(A) ((_iq7)(A) >> (7 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 6) -#define _IQtoQ6(A) ((int32_t)(A) >> (GLOBAL_IQ - 6)) -#define _Q6toIQ(A) ((_iq6)(A) << (GLOBAL_IQ - 6)) -#else -#define _IQtoQ6(A) ((int32_t)(A) << (6 - GLOBAL_IQ)) -#define _Q6toIQ(A) ((_iq6)(A) >> (6 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 5) -#define _IQtoQ5(A) ((int32_t)(A) >> (GLOBAL_IQ - 5)) -#define _Q5toIQ(A) ((_iq5)(A) << (GLOBAL_IQ - 5)) -#else -#define _IQtoQ5(A) ((int32_t)(A) << (5 - GLOBAL_IQ)) -#define _Q5toIQ(A) ((_iq5)(A) >> (5 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 4) -#define _IQtoQ4(A) ((int32_t)(A) >> (GLOBAL_IQ - 4)) -#define _Q4toIQ(A) ((_iq4)(A) << (GLOBAL_IQ - 4)) -#else -#define _IQtoQ4(A) ((int32_t)(A) << (4 - GLOBAL_IQ)) -#define _Q4toIQ(A) ((_iq4)(A) >> (4 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 3) -#define _IQtoQ3(A) ((int32_t)(A) >> (GLOBAL_IQ - 3)) -#define _Q3toIQ(A) ((_iq3)(A) << (GLOBAL_IQ - 3)) -#else -#define _IQtoQ3(A) ((int32_t)(A) << (3 - GLOBAL_IQ)) -#define _Q3toIQ(A) ((_iq3)(A) >> (3 - GLOBAL_IQ)) -#endif - -#if (GLOBAL_IQ >= 2) -#define _IQtoQ2(A) ((int32_t)(A) >> (GLOBAL_IQ - 2)) -#define _Q2toIQ(A) ((_iq2)(A) << (GLOBAL_IQ - 2)) -#else -#define _IQtoQ2(A) ((int32_t)(A) << (2 - GLOBAL_IQ)) -#define _Q2toIQ(A) ((_iq2)(A) >> (2 - GLOBAL_IQ)) -#endif - -#define _IQtoQ1(A) ((int32_t)(A) >> (GLOBAL_IQ - 1)) -#define _Q1toIQ(A) ((_iq1)(A) << (GLOBAL_IQ - 1)) - -//***************************************************************************** -// -// Multiplies two IQ numbers. -// -//***************************************************************************** -extern _iq30 _IQ30mpy(_iq30 A, _iq30 B); -extern _iq29 _IQ29mpy(_iq29 A, _iq29 B); -extern _iq28 _IQ28mpy(_iq28 A, _iq28 B); -extern _iq27 _IQ27mpy(_iq27 A, _iq27 B); -extern _iq26 _IQ26mpy(_iq26 A, _iq26 B); -extern _iq25 _IQ25mpy(_iq25 A, _iq25 B); -extern _iq24 _IQ24mpy(_iq24 A, _iq24 B); -extern _iq23 _IQ23mpy(_iq23 A, _iq23 B); -extern _iq22 _IQ22mpy(_iq22 A, _iq22 B); -extern _iq21 _IQ21mpy(_iq21 A, _iq21 B); -extern _iq20 _IQ20mpy(_iq20 A, _iq20 B); -extern _iq19 _IQ19mpy(_iq19 A, _iq19 B); -extern _iq18 _IQ18mpy(_iq18 A, _iq18 B); -extern _iq17 _IQ17mpy(_iq17 A, _iq17 B); -extern _iq16 _IQ16mpy(_iq16 A, _iq16 B); -extern _iq15 _IQ15mpy(_iq15 A, _iq15 B); -extern _iq14 _IQ14mpy(_iq14 A, _iq14 B); -extern _iq13 _IQ13mpy(_iq13 A, _iq13 B); -extern _iq12 _IQ12mpy(_iq12 A, _iq12 B); -extern _iq11 _IQ11mpy(_iq11 A, _iq11 B); -extern _iq10 _IQ10mpy(_iq10 A, _iq10 B); -extern _iq9 _IQ9mpy(_iq9 A, _iq9 B); -extern _iq8 _IQ8mpy(_iq8 A, _iq8 B); -extern _iq7 _IQ7mpy(_iq7 A, _iq7 B); -extern _iq6 _IQ6mpy(_iq6 A, _iq6 B); -extern _iq5 _IQ5mpy(_iq5 A, _iq5 B); -extern _iq4 _IQ4mpy(_iq4 A, _iq4 B); -extern _iq3 _IQ3mpy(_iq3 A, _iq3 B); -extern _iq2 _IQ2mpy(_iq2 A, _iq2 B); -extern _iq1 _IQ1mpy(_iq1 A, _iq1 B); - -#if GLOBAL_IQ == 30 -#define _IQmpy(A, B) _IQ30mpy(A, B) -#endif -#if GLOBAL_IQ == 29 -#define _IQmpy(A, B) _IQ29mpy(A, B) -#endif -#if GLOBAL_IQ == 28 -#define _IQmpy(A, B) _IQ28mpy(A, B) -#endif -#if GLOBAL_IQ == 27 -#define _IQmpy(A, B) _IQ27mpy(A, B) -#endif -#if GLOBAL_IQ == 26 -#define _IQmpy(A, B) _IQ26mpy(A, B) -#endif -#if GLOBAL_IQ == 25 -#define _IQmpy(A, B) _IQ25mpy(A, B) -#endif -#if GLOBAL_IQ == 24 -#define _IQmpy(A, B) _IQ24mpy(A, B) -#endif -#if GLOBAL_IQ == 23 -#define _IQmpy(A, B) _IQ23mpy(A, B) -#endif -#if GLOBAL_IQ == 22 -#define _IQmpy(A, B) _IQ22mpy(A, B) -#endif -#if GLOBAL_IQ == 21 -#define _IQmpy(A, B) _IQ21mpy(A, B) -#endif -#if GLOBAL_IQ == 20 -#define _IQmpy(A, B) _IQ20mpy(A, B) -#endif -#if GLOBAL_IQ == 19 -#define _IQmpy(A, B) _IQ19mpy(A, B) -#endif -#if GLOBAL_IQ == 18 -#define _IQmpy(A, B) _IQ18mpy(A, B) -#endif -#if GLOBAL_IQ == 17 -#define _IQmpy(A, B) _IQ17mpy(A, B) -#endif -#if GLOBAL_IQ == 16 -#define _IQmpy(A, B) _IQ16mpy(A, B) -#endif -#if GLOBAL_IQ == 15 -#define _IQmpy(A, B) _IQ15mpy(A, B) -#endif -#if GLOBAL_IQ == 14 -#define _IQmpy(A, B) _IQ14mpy(A, B) -#endif -#if GLOBAL_IQ == 13 -#define _IQmpy(A, B) _IQ13mpy(A, B) -#endif -#if GLOBAL_IQ == 12 -#define _IQmpy(A, B) _IQ12mpy(A, B) -#endif -#if GLOBAL_IQ == 11 -#define _IQmpy(A, B) _IQ11mpy(A, B) -#endif -#if GLOBAL_IQ == 10 -#define _IQmpy(A, B) _IQ10mpy(A, B) -#endif -#if GLOBAL_IQ == 9 -#define _IQmpy(A, B) _IQ9mpy(A, B) -#endif -#if GLOBAL_IQ == 8 -#define _IQmpy(A, B) _IQ8mpy(A, B) -#endif -#if GLOBAL_IQ == 7 -#define _IQmpy(A, B) _IQ7mpy(A, B) -#endif -#if GLOBAL_IQ == 6 -#define _IQmpy(A, B) _IQ6mpy(A, B) -#endif -#if GLOBAL_IQ == 5 -#define _IQmpy(A, B) _IQ5mpy(A, B) -#endif -#if GLOBAL_IQ == 4 -#define _IQmpy(A, B) _IQ4mpy(A, B) -#endif -#if GLOBAL_IQ == 3 -#define _IQmpy(A, B) _IQ3mpy(A, B) -#endif -#if GLOBAL_IQ == 2 -#define _IQmpy(A, B) _IQ2mpy(A, B) -#endif -#if GLOBAL_IQ == 1 -#define _IQmpy(A, B) _IQ1mpy(A, B) -#endif - -//***************************************************************************** -// -// Multiplies two IQ numbers, with rounding. -// -//***************************************************************************** -extern _iq30 _IQ30rmpy(_iq30 A, _iq30 B); -extern _iq29 _IQ29rmpy(_iq29 A, _iq29 B); -extern _iq28 _IQ28rmpy(_iq28 A, _iq28 B); -extern _iq27 _IQ27rmpy(_iq27 A, _iq27 B); -extern _iq26 _IQ26rmpy(_iq26 A, _iq26 B); -extern _iq25 _IQ25rmpy(_iq25 A, _iq25 B); -extern _iq24 _IQ24rmpy(_iq24 A, _iq24 B); -extern _iq23 _IQ23rmpy(_iq23 A, _iq23 B); -extern _iq22 _IQ22rmpy(_iq22 A, _iq22 B); -extern _iq21 _IQ21rmpy(_iq21 A, _iq21 B); -extern _iq20 _IQ20rmpy(_iq20 A, _iq20 B); -extern _iq19 _IQ19rmpy(_iq19 A, _iq19 B); -extern _iq18 _IQ18rmpy(_iq18 A, _iq18 B); -extern _iq17 _IQ17rmpy(_iq17 A, _iq17 B); -extern _iq16 _IQ16rmpy(_iq16 A, _iq16 B); -extern _iq15 _IQ15rmpy(_iq15 A, _iq15 B); -extern _iq14 _IQ14rmpy(_iq14 A, _iq14 B); -extern _iq13 _IQ13rmpy(_iq13 A, _iq13 B); -extern _iq12 _IQ12rmpy(_iq12 A, _iq12 B); -extern _iq11 _IQ11rmpy(_iq11 A, _iq11 B); -extern _iq10 _IQ10rmpy(_iq10 A, _iq10 B); -extern _iq9 _IQ9rmpy(_iq9 A, _iq9 B); -extern _iq8 _IQ8rmpy(_iq8 A, _iq8 B); -extern _iq7 _IQ7rmpy(_iq7 A, _iq7 B); -extern _iq6 _IQ6rmpy(_iq6 A, _iq6 B); -extern _iq5 _IQ5rmpy(_iq5 A, _iq5 B); -extern _iq4 _IQ4rmpy(_iq4 A, _iq4 B); -extern _iq3 _IQ3rmpy(_iq3 A, _iq3 B); -extern _iq2 _IQ2rmpy(_iq2 A, _iq2 B); -extern _iq1 _IQ1rmpy(_iq1 A, _iq1 B); - -#if GLOBAL_IQ == 30 -#define _IQrmpy(A, B) _IQ30rmpy(A, B) -#endif -#if GLOBAL_IQ == 29 -#define _IQrmpy(A, B) _IQ29rmpy(A, B) -#endif -#if GLOBAL_IQ == 28 -#define _IQrmpy(A, B) _IQ28rmpy(A, B) -#endif -#if GLOBAL_IQ == 27 -#define _IQrmpy(A, B) _IQ27rmpy(A, B) -#endif -#if GLOBAL_IQ == 26 -#define _IQrmpy(A, B) _IQ26rmpy(A, B) -#endif -#if GLOBAL_IQ == 25 -#define _IQrmpy(A, B) _IQ25rmpy(A, B) -#endif -#if GLOBAL_IQ == 24 -#define _IQrmpy(A, B) _IQ24rmpy(A, B) -#endif -#if GLOBAL_IQ == 23 -#define _IQrmpy(A, B) _IQ23rmpy(A, B) -#endif -#if GLOBAL_IQ == 22 -#define _IQrmpy(A, B) _IQ22rmpy(A, B) -#endif -#if GLOBAL_IQ == 21 -#define _IQrmpy(A, B) _IQ21rmpy(A, B) -#endif -#if GLOBAL_IQ == 20 -#define _IQrmpy(A, B) _IQ20rmpy(A, B) -#endif -#if GLOBAL_IQ == 19 -#define _IQrmpy(A, B) _IQ19rmpy(A, B) -#endif -#if GLOBAL_IQ == 18 -#define _IQrmpy(A, B) _IQ18rmpy(A, B) -#endif -#if GLOBAL_IQ == 17 -#define _IQrmpy(A, B) _IQ17rmpy(A, B) -#endif -#if GLOBAL_IQ == 16 -#define _IQrmpy(A, B) _IQ16rmpy(A, B) -#endif -#if GLOBAL_IQ == 15 -#define _IQrmpy(A, B) _IQ15rmpy(A, B) -#endif -#if GLOBAL_IQ == 14 -#define _IQrmpy(A, B) _IQ14rmpy(A, B) -#endif -#if GLOBAL_IQ == 13 -#define _IQrmpy(A, B) _IQ13rmpy(A, B) -#endif -#if GLOBAL_IQ == 12 -#define _IQrmpy(A, B) _IQ12rmpy(A, B) -#endif -#if GLOBAL_IQ == 11 -#define _IQrmpy(A, B) _IQ11rmpy(A, B) -#endif -#if GLOBAL_IQ == 10 -#define _IQrmpy(A, B) _IQ10rmpy(A, B) -#endif -#if GLOBAL_IQ == 9 -#define _IQrmpy(A, B) _IQ9rmpy(A, B) -#endif -#if GLOBAL_IQ == 8 -#define _IQrmpy(A, B) _IQ8rmpy(A, B) -#endif -#if GLOBAL_IQ == 7 -#define _IQrmpy(A, B) _IQ7rmpy(A, B) -#endif -#if GLOBAL_IQ == 6 -#define _IQrmpy(A, B) _IQ6rmpy(A, B) -#endif -#if GLOBAL_IQ == 5 -#define _IQrmpy(A, B) _IQ5rmpy(A, B) -#endif -#if GLOBAL_IQ == 4 -#define _IQrmpy(A, B) _IQ4rmpy(A, B) -#endif -#if GLOBAL_IQ == 3 -#define _IQrmpy(A, B) _IQ3rmpy(A, B) -#endif -#if GLOBAL_IQ == 2 -#define _IQrmpy(A, B) _IQ2rmpy(A, B) -#endif -#if GLOBAL_IQ == 1 -#define _IQrmpy(A, B) _IQ1rmpy(A, B) -#endif - -//***************************************************************************** -// -// Multiplies two IQ numbers, with rounding and saturation. -// -//***************************************************************************** -extern _iq30 _IQ30rsmpy(_iq30 A, _iq30 B); -extern _iq29 _IQ29rsmpy(_iq29 A, _iq29 B); -extern _iq28 _IQ28rsmpy(_iq28 A, _iq28 B); -extern _iq27 _IQ27rsmpy(_iq27 A, _iq27 B); -extern _iq26 _IQ26rsmpy(_iq26 A, _iq26 B); -extern _iq25 _IQ25rsmpy(_iq25 A, _iq25 B); -extern _iq24 _IQ24rsmpy(_iq24 A, _iq24 B); -extern _iq23 _IQ23rsmpy(_iq23 A, _iq23 B); -extern _iq22 _IQ22rsmpy(_iq22 A, _iq22 B); -extern _iq21 _IQ21rsmpy(_iq21 A, _iq21 B); -extern _iq20 _IQ20rsmpy(_iq20 A, _iq20 B); -extern _iq19 _IQ19rsmpy(_iq19 A, _iq19 B); -extern _iq18 _IQ18rsmpy(_iq18 A, _iq18 B); -extern _iq17 _IQ17rsmpy(_iq17 A, _iq17 B); -extern _iq16 _IQ16rsmpy(_iq16 A, _iq16 B); -extern _iq15 _IQ15rsmpy(_iq15 A, _iq15 B); -extern _iq14 _IQ14rsmpy(_iq14 A, _iq14 B); -extern _iq13 _IQ13rsmpy(_iq13 A, _iq13 B); -extern _iq12 _IQ12rsmpy(_iq12 A, _iq12 B); -extern _iq11 _IQ11rsmpy(_iq11 A, _iq11 B); -extern _iq10 _IQ10rsmpy(_iq10 A, _iq10 B); -extern _iq9 _IQ9rsmpy(_iq9 A, _iq9 B); -extern _iq8 _IQ8rsmpy(_iq8 A, _iq8 B); -extern _iq7 _IQ7rsmpy(_iq7 A, _iq7 B); -extern _iq6 _IQ6rsmpy(_iq6 A, _iq6 B); -extern _iq5 _IQ5rsmpy(_iq5 A, _iq5 B); -extern _iq4 _IQ4rsmpy(_iq4 A, _iq4 B); -extern _iq3 _IQ3rsmpy(_iq3 A, _iq3 B); -extern _iq2 _IQ2rsmpy(_iq2 A, _iq2 B); -extern _iq1 _IQ1rsmpy(_iq1 A, _iq1 B); - -#if GLOBAL_IQ == 30 -#define _IQrsmpy(A, B) _IQ30rsmpy(A, B) -#endif -#if GLOBAL_IQ == 29 -#define _IQrsmpy(A, B) _IQ29rsmpy(A, B) -#endif -#if GLOBAL_IQ == 28 -#define _IQrsmpy(A, B) _IQ28rsmpy(A, B) -#endif -#if GLOBAL_IQ == 27 -#define _IQrsmpy(A, B) _IQ27rsmpy(A, B) -#endif -#if GLOBAL_IQ == 26 -#define _IQrsmpy(A, B) _IQ26rsmpy(A, B) -#endif -#if GLOBAL_IQ == 25 -#define _IQrsmpy(A, B) _IQ25rsmpy(A, B) -#endif -#if GLOBAL_IQ == 24 -#define _IQrsmpy(A, B) _IQ24rsmpy(A, B) -#endif -#if GLOBAL_IQ == 23 -#define _IQrsmpy(A, B) _IQ23rsmpy(A, B) -#endif -#if GLOBAL_IQ == 22 -#define _IQrsmpy(A, B) _IQ22rsmpy(A, B) -#endif -#if GLOBAL_IQ == 21 -#define _IQrsmpy(A, B) _IQ21rsmpy(A, B) -#endif -#if GLOBAL_IQ == 20 -#define _IQrsmpy(A, B) _IQ20rsmpy(A, B) -#endif -#if GLOBAL_IQ == 19 -#define _IQrsmpy(A, B) _IQ19rsmpy(A, B) -#endif -#if GLOBAL_IQ == 18 -#define _IQrsmpy(A, B) _IQ18rsmpy(A, B) -#endif -#if GLOBAL_IQ == 17 -#define _IQrsmpy(A, B) _IQ17rsmpy(A, B) -#endif -#if GLOBAL_IQ == 16 -#define _IQrsmpy(A, B) _IQ16rsmpy(A, B) -#endif -#if GLOBAL_IQ == 15 -#define _IQrsmpy(A, B) _IQ15rsmpy(A, B) -#endif -#if GLOBAL_IQ == 14 -#define _IQrsmpy(A, B) _IQ14rsmpy(A, B) -#endif -#if GLOBAL_IQ == 13 -#define _IQrsmpy(A, B) _IQ13rsmpy(A, B) -#endif -#if GLOBAL_IQ == 12 -#define _IQrsmpy(A, B) _IQ12rsmpy(A, B) -#endif -#if GLOBAL_IQ == 11 -#define _IQrsmpy(A, B) _IQ11rsmpy(A, B) -#endif -#if GLOBAL_IQ == 10 -#define _IQrsmpy(A, B) _IQ10rsmpy(A, B) -#endif -#if GLOBAL_IQ == 9 -#define _IQrsmpy(A, B) _IQ9rsmpy(A, B) -#endif -#if GLOBAL_IQ == 8 -#define _IQrsmpy(A, B) _IQ8rsmpy(A, B) -#endif -#if GLOBAL_IQ == 7 -#define _IQrsmpy(A, B) _IQ7rsmpy(A, B) -#endif -#if GLOBAL_IQ == 6 -#define _IQrsmpy(A, B) _IQ6rsmpy(A, B) -#endif -#if GLOBAL_IQ == 5 -#define _IQrsmpy(A, B) _IQ5rsmpy(A, B) -#endif -#if GLOBAL_IQ == 4 -#define _IQrsmpy(A, B) _IQ4rsmpy(A, B) -#endif -#if GLOBAL_IQ == 3 -#define _IQrsmpy(A, B) _IQ3rsmpy(A, B) -#endif -#if GLOBAL_IQ == 2 -#define _IQrsmpy(A, B) _IQ2rsmpy(A, B) -#endif -#if GLOBAL_IQ == 1 -#define _IQrsmpy(A, B) _IQ1rsmpy(A, B) -#endif - -//***************************************************************************** -// -// Divides two IQ numbers. -// -//***************************************************************************** -extern _iq30 _IQ30div(_iq30 A, _iq30 B); -extern _iq29 _IQ29div(_iq29 A, _iq29 B); -extern _iq28 _IQ28div(_iq28 A, _iq28 B); -extern _iq27 _IQ27div(_iq27 A, _iq27 B); -extern _iq26 _IQ26div(_iq26 A, _iq26 B); -extern _iq25 _IQ25div(_iq25 A, _iq25 B); -extern _iq24 _IQ24div(_iq24 A, _iq24 B); -extern _iq23 _IQ23div(_iq23 A, _iq23 B); -extern _iq22 _IQ22div(_iq22 A, _iq22 B); -extern _iq21 _IQ21div(_iq21 A, _iq21 B); -extern _iq20 _IQ20div(_iq20 A, _iq20 B); -extern _iq19 _IQ19div(_iq19 A, _iq19 B); -extern _iq18 _IQ18div(_iq18 A, _iq18 B); -extern _iq17 _IQ17div(_iq17 A, _iq17 B); -extern _iq16 _IQ16div(_iq16 A, _iq16 B); -extern _iq15 _IQ15div(_iq15 A, _iq15 B); -extern _iq14 _IQ14div(_iq14 A, _iq14 B); -extern _iq13 _IQ13div(_iq13 A, _iq13 B); -extern _iq12 _IQ12div(_iq12 A, _iq12 B); -extern _iq11 _IQ11div(_iq11 A, _iq11 B); -extern _iq10 _IQ10div(_iq10 A, _iq10 B); -extern _iq9 _IQ9div(_iq9 A, _iq9 B); -extern _iq8 _IQ8div(_iq8 A, _iq8 B); -extern _iq7 _IQ7div(_iq7 A, _iq7 B); -extern _iq6 _IQ6div(_iq6 A, _iq6 B); -extern _iq5 _IQ5div(_iq5 A, _iq5 B); -extern _iq4 _IQ4div(_iq4 A, _iq4 B); -extern _iq3 _IQ3div(_iq3 A, _iq3 B); -extern _iq2 _IQ2div(_iq2 A, _iq2 B); -extern _iq1 _IQ1div(_iq1 A, _iq1 B); - -#if GLOBAL_IQ == 30 -#define _IQdiv(A, B) _IQ30div(A, B) -#endif -#if GLOBAL_IQ == 29 -#define _IQdiv(A, B) _IQ29div(A, B) -#endif -#if GLOBAL_IQ == 28 -#define _IQdiv(A, B) _IQ28div(A, B) -#endif -#if GLOBAL_IQ == 27 -#define _IQdiv(A, B) _IQ27div(A, B) -#endif -#if GLOBAL_IQ == 26 -#define _IQdiv(A, B) _IQ26div(A, B) -#endif -#if GLOBAL_IQ == 25 -#define _IQdiv(A, B) _IQ25div(A, B) -#endif -#if GLOBAL_IQ == 24 -#define _IQdiv(A, B) _IQ24div(A, B) -#endif -#if GLOBAL_IQ == 23 -#define _IQdiv(A, B) _IQ23div(A, B) -#endif -#if GLOBAL_IQ == 22 -#define _IQdiv(A, B) _IQ22div(A, B) -#endif -#if GLOBAL_IQ == 21 -#define _IQdiv(A, B) _IQ21div(A, B) -#endif -#if GLOBAL_IQ == 20 -#define _IQdiv(A, B) _IQ20div(A, B) -#endif -#if GLOBAL_IQ == 19 -#define _IQdiv(A, B) _IQ19div(A, B) -#endif -#if GLOBAL_IQ == 18 -#define _IQdiv(A, B) _IQ18div(A, B) -#endif -#if GLOBAL_IQ == 17 -#define _IQdiv(A, B) _IQ17div(A, B) -#endif -#if GLOBAL_IQ == 16 -#define _IQdiv(A, B) _IQ16div(A, B) -#endif -#if GLOBAL_IQ == 15 -#define _IQdiv(A, B) _IQ15div(A, B) -#endif -#if GLOBAL_IQ == 14 -#define _IQdiv(A, B) _IQ14div(A, B) -#endif -#if GLOBAL_IQ == 13 -#define _IQdiv(A, B) _IQ13div(A, B) -#endif -#if GLOBAL_IQ == 12 -#define _IQdiv(A, B) _IQ12div(A, B) -#endif -#if GLOBAL_IQ == 11 -#define _IQdiv(A, B) _IQ11div(A, B) -#endif -#if GLOBAL_IQ == 10 -#define _IQdiv(A, B) _IQ10div(A, B) -#endif -#if GLOBAL_IQ == 9 -#define _IQdiv(A, B) _IQ9div(A, B) -#endif -#if GLOBAL_IQ == 8 -#define _IQdiv(A, B) _IQ8div(A, B) -#endif -#if GLOBAL_IQ == 7 -#define _IQdiv(A, B) _IQ7div(A, B) -#endif -#if GLOBAL_IQ == 6 -#define _IQdiv(A, B) _IQ6div(A, B) -#endif -#if GLOBAL_IQ == 5 -#define _IQdiv(A, B) _IQ5div(A, B) -#endif -#if GLOBAL_IQ == 4 -#define _IQdiv(A, B) _IQ4div(A, B) -#endif -#if GLOBAL_IQ == 3 -#define _IQdiv(A, B) _IQ3div(A, B) -#endif -#if GLOBAL_IQ == 2 -#define _IQdiv(A, B) _IQ2div(A, B) -#endif -#if GLOBAL_IQ == 1 -#define _IQdiv(A, B) _IQ1div(A, B) -#endif - -//***************************************************************************** -// -// Computes the sin of an IQ number. -// -//***************************************************************************** -extern _iq29 _IQ29sin(_iq29 A); -extern _iq28 _IQ28sin(_iq28 A); -extern _iq27 _IQ27sin(_iq27 A); -extern _iq26 _IQ26sin(_iq26 A); -extern _iq25 _IQ25sin(_iq25 A); -extern _iq24 _IQ24sin(_iq24 A); -extern _iq23 _IQ23sin(_iq23 A); -extern _iq22 _IQ22sin(_iq22 A); -extern _iq21 _IQ21sin(_iq21 A); -extern _iq20 _IQ20sin(_iq20 A); -extern _iq19 _IQ19sin(_iq19 A); -extern _iq18 _IQ18sin(_iq18 A); -extern _iq17 _IQ17sin(_iq17 A); -extern _iq16 _IQ16sin(_iq16 A); -extern _iq15 _IQ15sin(_iq15 A); -extern _iq14 _IQ14sin(_iq14 A); -extern _iq13 _IQ13sin(_iq13 A); -extern _iq12 _IQ12sin(_iq12 A); -extern _iq11 _IQ11sin(_iq11 A); -extern _iq10 _IQ10sin(_iq10 A); -extern _iq9 _IQ9sin(_iq9 A); -extern _iq8 _IQ8sin(_iq8 A); -extern _iq7 _IQ7sin(_iq7 A); -extern _iq6 _IQ6sin(_iq6 A); -extern _iq5 _IQ5sin(_iq5 A); -extern _iq4 _IQ4sin(_iq4 A); -extern _iq3 _IQ3sin(_iq3 A); -extern _iq2 _IQ2sin(_iq2 A); -extern _iq1 _IQ1sin(_iq1 A); - -#if GLOBAL_IQ == 29 -#define _IQsin(A) _IQ29sin(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQsin(A) _IQ28sin(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQsin(A) _IQ27sin(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQsin(A) _IQ26sin(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQsin(A) _IQ25sin(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQsin(A) _IQ24sin(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQsin(A) _IQ23sin(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQsin(A) _IQ22sin(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQsin(A) _IQ21sin(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQsin(A) _IQ20sin(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQsin(A) _IQ19sin(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQsin(A) _IQ18sin(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQsin(A) _IQ17sin(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQsin(A) _IQ16sin(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQsin(A) _IQ15sin(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQsin(A) _IQ14sin(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQsin(A) _IQ13sin(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQsin(A) _IQ12sin(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQsin(A) _IQ11sin(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQsin(A) _IQ10sin(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQsin(A) _IQ9sin(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQsin(A) _IQ8sin(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQsin(A) _IQ7sin(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQsin(A) _IQ6sin(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQsin(A) _IQ5sin(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQsin(A) _IQ4sin(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQsin(A) _IQ3sin(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQsin(A) _IQ2sin(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQsin(A) _IQ1sin(A) -#endif - -//***************************************************************************** -// -// Computes the sin of an IQ number, using cycles per unit instead of radians. -// -//***************************************************************************** -extern _iq30 _IQ30sinPU(_iq30 A); -extern _iq29 _IQ29sinPU(_iq29 A); -extern _iq28 _IQ28sinPU(_iq28 A); -extern _iq27 _IQ27sinPU(_iq27 A); -extern _iq26 _IQ26sinPU(_iq26 A); -extern _iq25 _IQ25sinPU(_iq25 A); -extern _iq24 _IQ24sinPU(_iq24 A); -extern _iq23 _IQ23sinPU(_iq23 A); -extern _iq22 _IQ22sinPU(_iq22 A); -extern _iq21 _IQ21sinPU(_iq21 A); -extern _iq20 _IQ20sinPU(_iq20 A); -extern _iq19 _IQ19sinPU(_iq19 A); -extern _iq18 _IQ18sinPU(_iq18 A); -extern _iq17 _IQ17sinPU(_iq17 A); -extern _iq16 _IQ16sinPU(_iq16 A); -extern _iq15 _IQ15sinPU(_iq15 A); -extern _iq14 _IQ14sinPU(_iq14 A); -extern _iq13 _IQ13sinPU(_iq13 A); -extern _iq12 _IQ12sinPU(_iq12 A); -extern _iq11 _IQ11sinPU(_iq11 A); -extern _iq10 _IQ10sinPU(_iq10 A); -extern _iq9 _IQ9sinPU(_iq9 A); -extern _iq8 _IQ8sinPU(_iq8 A); -extern _iq7 _IQ7sinPU(_iq7 A); -extern _iq6 _IQ6sinPU(_iq6 A); -extern _iq5 _IQ5sinPU(_iq5 A); -extern _iq4 _IQ4sinPU(_iq4 A); -extern _iq3 _IQ3sinPU(_iq3 A); -extern _iq2 _IQ2sinPU(_iq2 A); -extern _iq1 _IQ1sinPU(_iq1 A); - -#if GLOBAL_IQ == 30 -#define _IQsinPU(A) _IQ30sinPU(A) -#endif -#if GLOBAL_IQ == 29 -#define _IQsinPU(A) _IQ29sinPU(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQsinPU(A) _IQ28sinPU(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQsinPU(A) _IQ27sinPU(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQsinPU(A) _IQ26sinPU(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQsinPU(A) _IQ25sinPU(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQsinPU(A) _IQ24sinPU(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQsinPU(A) _IQ23sinPU(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQsinPU(A) _IQ22sinPU(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQsinPU(A) _IQ21sinPU(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQsinPU(A) _IQ20sinPU(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQsinPU(A) _IQ19sinPU(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQsinPU(A) _IQ18sinPU(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQsinPU(A) _IQ17sinPU(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQsinPU(A) _IQ16sinPU(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQsinPU(A) _IQ15sinPU(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQsinPU(A) _IQ14sinPU(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQsinPU(A) _IQ13sinPU(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQsinPU(A) _IQ12sinPU(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQsinPU(A) _IQ11sinPU(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQsinPU(A) _IQ10sinPU(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQsinPU(A) _IQ9sinPU(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQsinPU(A) _IQ8sinPU(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQsinPU(A) _IQ7sinPU(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQsinPU(A) _IQ6sinPU(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQsinPU(A) _IQ5sinPU(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQsinPU(A) _IQ4sinPU(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQsinPU(A) _IQ3sinPU(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQsinPU(A) _IQ2sinPU(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQsinPU(A) _IQ1sinPU(A) -#endif - -//***************************************************************************** -// -// Computes the arcsin of an IQ number. -// -//***************************************************************************** -extern _iq29 _IQ29asin(_iq29 A); -extern _iq28 _IQ28asin(_iq28 A); -extern _iq27 _IQ27asin(_iq27 A); -extern _iq26 _IQ26asin(_iq26 A); -extern _iq25 _IQ25asin(_iq25 A); -extern _iq24 _IQ24asin(_iq24 A); -extern _iq23 _IQ23asin(_iq23 A); -extern _iq22 _IQ22asin(_iq22 A); -extern _iq21 _IQ21asin(_iq21 A); -extern _iq20 _IQ20asin(_iq20 A); -extern _iq19 _IQ19asin(_iq19 A); -extern _iq18 _IQ18asin(_iq18 A); -extern _iq17 _IQ17asin(_iq17 A); -extern _iq16 _IQ16asin(_iq16 A); -extern _iq15 _IQ15asin(_iq15 A); -extern _iq14 _IQ14asin(_iq14 A); -extern _iq13 _IQ13asin(_iq13 A); -extern _iq12 _IQ12asin(_iq12 A); -extern _iq11 _IQ11asin(_iq11 A); -extern _iq10 _IQ10asin(_iq10 A); -extern _iq9 _IQ9asin(_iq9 A); -extern _iq8 _IQ8asin(_iq8 A); -extern _iq7 _IQ7asin(_iq7 A); -extern _iq6 _IQ6asin(_iq6 A); -extern _iq5 _IQ5asin(_iq5 A); -extern _iq4 _IQ4asin(_iq4 A); -extern _iq3 _IQ3asin(_iq3 A); -extern _iq2 _IQ2asin(_iq2 A); -extern _iq1 _IQ1asin(_iq1 A); - -#if GLOBAL_IQ == 29 -#define _IQasin(A) _IQ29asin(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQasin(A) _IQ28asin(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQasin(A) _IQ27asin(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQasin(A) _IQ26asin(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQasin(A) _IQ25asin(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQasin(A) _IQ24asin(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQasin(A) _IQ23asin(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQasin(A) _IQ22asin(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQasin(A) _IQ21asin(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQasin(A) _IQ20asin(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQasin(A) _IQ19asin(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQasin(A) _IQ18asin(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQasin(A) _IQ17asin(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQasin(A) _IQ16asin(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQasin(A) _IQ15asin(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQasin(A) _IQ14asin(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQasin(A) _IQ13asin(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQasin(A) _IQ12asin(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQasin(A) _IQ11asin(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQasin(A) _IQ10asin(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQasin(A) _IQ9asin(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQasin(A) _IQ8asin(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQasin(A) _IQ7asin(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQasin(A) _IQ6asin(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQasin(A) _IQ5asin(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQasin(A) _IQ4asin(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQasin(A) _IQ3asin(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQasin(A) _IQ2asin(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQasin(A) _IQ1asin(A) -#endif - -//***************************************************************************** -// -// Computes the cos of an IQ number. -// -//***************************************************************************** -extern _iq29 _IQ29cos(_iq29 A); -extern _iq28 _IQ28cos(_iq28 A); -extern _iq27 _IQ27cos(_iq27 A); -extern _iq26 _IQ26cos(_iq26 A); -extern _iq25 _IQ25cos(_iq25 A); -extern _iq24 _IQ24cos(_iq24 A); -extern _iq23 _IQ23cos(_iq23 A); -extern _iq22 _IQ22cos(_iq22 A); -extern _iq21 _IQ21cos(_iq21 A); -extern _iq20 _IQ20cos(_iq20 A); -extern _iq19 _IQ19cos(_iq19 A); -extern _iq18 _IQ18cos(_iq18 A); -extern _iq17 _IQ17cos(_iq17 A); -extern _iq16 _IQ16cos(_iq16 A); -extern _iq15 _IQ15cos(_iq15 A); -extern _iq14 _IQ14cos(_iq14 A); -extern _iq13 _IQ13cos(_iq13 A); -extern _iq12 _IQ12cos(_iq12 A); -extern _iq11 _IQ11cos(_iq11 A); -extern _iq10 _IQ10cos(_iq10 A); -extern _iq9 _IQ9cos(_iq9 A); -extern _iq8 _IQ8cos(_iq8 A); -extern _iq7 _IQ7cos(_iq7 A); -extern _iq6 _IQ6cos(_iq6 A); -extern _iq5 _IQ5cos(_iq5 A); -extern _iq4 _IQ4cos(_iq4 A); -extern _iq3 _IQ3cos(_iq3 A); -extern _iq2 _IQ2cos(_iq2 A); -extern _iq1 _IQ1cos(_iq1 A); - -#if GLOBAL_IQ == 29 -#define _IQcos(A) _IQ29cos(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQcos(A) _IQ28cos(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQcos(A) _IQ27cos(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQcos(A) _IQ26cos(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQcos(A) _IQ25cos(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQcos(A) _IQ24cos(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQcos(A) _IQ23cos(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQcos(A) _IQ22cos(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQcos(A) _IQ21cos(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQcos(A) _IQ20cos(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQcos(A) _IQ19cos(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQcos(A) _IQ18cos(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQcos(A) _IQ17cos(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQcos(A) _IQ16cos(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQcos(A) _IQ15cos(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQcos(A) _IQ14cos(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQcos(A) _IQ13cos(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQcos(A) _IQ12cos(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQcos(A) _IQ11cos(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQcos(A) _IQ10cos(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQcos(A) _IQ9cos(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQcos(A) _IQ8cos(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQcos(A) _IQ7cos(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQcos(A) _IQ6cos(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQcos(A) _IQ5cos(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQcos(A) _IQ4cos(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQcos(A) _IQ3cos(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQcos(A) _IQ2cos(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQcos(A) _IQ1cos(A) -#endif - -//***************************************************************************** -// -// Computes the cos of an IQ number, using cycles per unit instead of radians. -// -//***************************************************************************** -extern _iq30 _IQ30cosPU(_iq30 A); -extern _iq29 _IQ29cosPU(_iq29 A); -extern _iq28 _IQ28cosPU(_iq28 A); -extern _iq27 _IQ27cosPU(_iq27 A); -extern _iq26 _IQ26cosPU(_iq26 A); -extern _iq25 _IQ25cosPU(_iq25 A); -extern _iq24 _IQ24cosPU(_iq24 A); -extern _iq23 _IQ23cosPU(_iq23 A); -extern _iq22 _IQ22cosPU(_iq22 A); -extern _iq21 _IQ21cosPU(_iq21 A); -extern _iq20 _IQ20cosPU(_iq20 A); -extern _iq19 _IQ19cosPU(_iq19 A); -extern _iq18 _IQ18cosPU(_iq18 A); -extern _iq17 _IQ17cosPU(_iq17 A); -extern _iq16 _IQ16cosPU(_iq16 A); -extern _iq15 _IQ15cosPU(_iq15 A); -extern _iq14 _IQ14cosPU(_iq14 A); -extern _iq13 _IQ13cosPU(_iq13 A); -extern _iq12 _IQ12cosPU(_iq12 A); -extern _iq11 _IQ11cosPU(_iq11 A); -extern _iq10 _IQ10cosPU(_iq10 A); -extern _iq9 _IQ9cosPU(_iq9 A); -extern _iq8 _IQ8cosPU(_iq8 A); -extern _iq7 _IQ7cosPU(_iq7 A); -extern _iq6 _IQ6cosPU(_iq6 A); -extern _iq5 _IQ5cosPU(_iq5 A); -extern _iq4 _IQ4cosPU(_iq4 A); -extern _iq3 _IQ3cosPU(_iq3 A); -extern _iq2 _IQ2cosPU(_iq2 A); -extern _iq1 _IQ1cosPU(_iq1 A); - -#if GLOBAL_IQ == 30 -#define _IQcosPU(A) _IQ30cosPU(A) -#endif -#if GLOBAL_IQ == 29 -#define _IQcosPU(A) _IQ29cosPU(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQcosPU(A) _IQ28cosPU(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQcosPU(A) _IQ27cosPU(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQcosPU(A) _IQ26cosPU(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQcosPU(A) _IQ25cosPU(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQcosPU(A) _IQ24cosPU(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQcosPU(A) _IQ23cosPU(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQcosPU(A) _IQ22cosPU(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQcosPU(A) _IQ21cosPU(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQcosPU(A) _IQ20cosPU(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQcosPU(A) _IQ19cosPU(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQcosPU(A) _IQ18cosPU(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQcosPU(A) _IQ17cosPU(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQcosPU(A) _IQ16cosPU(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQcosPU(A) _IQ15cosPU(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQcosPU(A) _IQ14cosPU(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQcosPU(A) _IQ13cosPU(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQcosPU(A) _IQ12cosPU(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQcosPU(A) _IQ11cosPU(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQcosPU(A) _IQ10cosPU(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQcosPU(A) _IQ9cosPU(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQcosPU(A) _IQ8cosPU(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQcosPU(A) _IQ7cosPU(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQcosPU(A) _IQ6cosPU(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQcosPU(A) _IQ5cosPU(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQcosPU(A) _IQ4cosPU(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQcosPU(A) _IQ3cosPU(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQcosPU(A) _IQ2cosPU(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQcosPU(A) _IQ1cosPU(A) -#endif - -//***************************************************************************** -// -// Computes the arccos of an IQ number. -// -//***************************************************************************** -#define _IQ29acos(A) (_IQ29(1.570796327) - _IQ29asin(A)) -#define _IQ28acos(A) (_IQ28(1.570796327) - _IQ28asin(A)) -#define _IQ27acos(A) (_IQ27(1.570796327) - _IQ27asin(A)) -#define _IQ26acos(A) (_IQ26(1.570796327) - _IQ26asin(A)) -#define _IQ25acos(A) (_IQ25(1.570796327) - _IQ25asin(A)) -#define _IQ24acos(A) (_IQ24(1.570796327) - _IQ24asin(A)) -#define _IQ23acos(A) (_IQ23(1.570796327) - _IQ23asin(A)) -#define _IQ22acos(A) (_IQ22(1.570796327) - _IQ22asin(A)) -#define _IQ21acos(A) (_IQ21(1.570796327) - _IQ21asin(A)) -#define _IQ20acos(A) (_IQ20(1.570796327) - _IQ20asin(A)) -#define _IQ19acos(A) (_IQ19(1.570796327) - _IQ19asin(A)) -#define _IQ18acos(A) (_IQ18(1.570796327) - _IQ18asin(A)) -#define _IQ17acos(A) (_IQ17(1.570796327) - _IQ17asin(A)) -#define _IQ16acos(A) (_IQ16(1.570796327) - _IQ16asin(A)) -#define _IQ15acos(A) (_IQ15(1.570796327) - _IQ15asin(A)) -#define _IQ14acos(A) (_IQ14(1.570796327) - _IQ14asin(A)) -#define _IQ13acos(A) (_IQ13(1.570796327) - _IQ13asin(A)) -#define _IQ12acos(A) (_IQ12(1.570796327) - _IQ12asin(A)) -#define _IQ11acos(A) (_IQ11(1.570796327) - _IQ11asin(A)) -#define _IQ10acos(A) (_IQ10(1.570796327) - _IQ10asin(A)) -#define _IQ9acos(A) (_IQ9(1.570796327) - _IQ9asin(A)) -#define _IQ8acos(A) (_IQ8(1.570796327) - _IQ8asin(A)) -#define _IQ7acos(A) (_IQ7(1.570796327) - _IQ7asin(A)) -#define _IQ6acos(A) (_IQ6(1.570796327) - _IQ6asin(A)) -#define _IQ5acos(A) (_IQ5(1.570796327) - _IQ5asin(A)) -#define _IQ4acos(A) (_IQ4(1.570796327) - _IQ4asin(A)) -#define _IQ3acos(A) (_IQ3(1.570796327) - _IQ3asin(A)) -#define _IQ2acos(A) (_IQ2(1.570796327) - _IQ2asin(A)) -#define _IQ1acos(A) (_IQ1(1.570796327) - _IQ1asin(A)) - -#if GLOBAL_IQ == 29 -#define _IQacos(A) _IQ29acos(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQacos(A) _IQ28acos(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQacos(A) _IQ27acos(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQacos(A) _IQ26acos(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQacos(A) _IQ25acos(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQacos(A) _IQ24acos(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQacos(A) _IQ23acos(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQacos(A) _IQ22acos(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQacos(A) _IQ21acos(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQacos(A) _IQ20acos(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQacos(A) _IQ19acos(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQacos(A) _IQ18acos(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQacos(A) _IQ17acos(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQacos(A) _IQ16acos(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQacos(A) _IQ15acos(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQacos(A) _IQ14acos(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQacos(A) _IQ13acos(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQacos(A) _IQ12acos(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQacos(A) _IQ11acos(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQacos(A) _IQ10acos(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQacos(A) _IQ9acos(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQacos(A) _IQ8acos(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQacos(A) _IQ7acos(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQacos(A) _IQ6acos(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQacos(A) _IQ5acos(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQacos(A) _IQ4acos(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQacos(A) _IQ3acos(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQacos(A) _IQ2acos(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQacos(A) _IQ1acos(A) -#endif - -//***************************************************************************** -// -// Computes the arctan of a coordinate specified by two IQ numbers. -// -//***************************************************************************** -extern _iq29 _IQ29atan2(_iq29 A, _iq29 B); -extern _iq28 _IQ28atan2(_iq28 A, _iq28 B); -extern _iq27 _IQ27atan2(_iq27 A, _iq27 B); -extern _iq26 _IQ26atan2(_iq26 A, _iq26 B); -extern _iq25 _IQ25atan2(_iq25 A, _iq25 B); -extern _iq24 _IQ24atan2(_iq24 A, _iq24 B); -extern _iq23 _IQ23atan2(_iq23 A, _iq23 B); -extern _iq22 _IQ22atan2(_iq22 A, _iq22 B); -extern _iq21 _IQ21atan2(_iq21 A, _iq21 B); -extern _iq20 _IQ20atan2(_iq20 A, _iq20 B); -extern _iq19 _IQ19atan2(_iq19 A, _iq19 B); -extern _iq18 _IQ18atan2(_iq18 A, _iq18 B); -extern _iq17 _IQ17atan2(_iq17 A, _iq17 B); -extern _iq16 _IQ16atan2(_iq16 A, _iq16 B); -extern _iq15 _IQ15atan2(_iq15 A, _iq15 B); -extern _iq14 _IQ14atan2(_iq14 A, _iq14 B); -extern _iq13 _IQ13atan2(_iq13 A, _iq13 B); -extern _iq12 _IQ12atan2(_iq12 A, _iq12 B); -extern _iq11 _IQ11atan2(_iq11 A, _iq11 B); -extern _iq10 _IQ10atan2(_iq10 A, _iq10 B); -extern _iq9 _IQ9atan2(_iq9 A, _iq9 B); -extern _iq8 _IQ8atan2(_iq8 A, _iq8 B); -extern _iq7 _IQ7atan2(_iq7 A, _iq7 B); -extern _iq6 _IQ6atan2(_iq6 A, _iq6 B); -extern _iq5 _IQ5atan2(_iq5 A, _iq5 B); -extern _iq4 _IQ4atan2(_iq4 A, _iq4 B); -extern _iq3 _IQ3atan2(_iq3 A, _iq3 B); -extern _iq2 _IQ2atan2(_iq2 A, _iq2 B); -extern _iq1 _IQ1atan2(_iq1 A, _iq1 B); - -#if GLOBAL_IQ == 29 -#define _IQatan2(A, B) _IQ29atan2(A, B) -#endif -#if GLOBAL_IQ == 28 -#define _IQatan2(A, B) _IQ28atan2(A, B) -#endif -#if GLOBAL_IQ == 27 -#define _IQatan2(A, B) _IQ27atan2(A, B) -#endif -#if GLOBAL_IQ == 26 -#define _IQatan2(A, B) _IQ26atan2(A, B) -#endif -#if GLOBAL_IQ == 25 -#define _IQatan2(A, B) _IQ25atan2(A, B) -#endif -#if GLOBAL_IQ == 24 -#define _IQatan2(A, B) _IQ24atan2(A, B) -#endif -#if GLOBAL_IQ == 23 -#define _IQatan2(A, B) _IQ23atan2(A, B) -#endif -#if GLOBAL_IQ == 22 -#define _IQatan2(A, B) _IQ22atan2(A, B) -#endif -#if GLOBAL_IQ == 21 -#define _IQatan2(A, B) _IQ21atan2(A, B) -#endif -#if GLOBAL_IQ == 20 -#define _IQatan2(A, B) _IQ20atan2(A, B) -#endif -#if GLOBAL_IQ == 19 -#define _IQatan2(A, B) _IQ19atan2(A, B) -#endif -#if GLOBAL_IQ == 18 -#define _IQatan2(A, B) _IQ18atan2(A, B) -#endif -#if GLOBAL_IQ == 17 -#define _IQatan2(A, B) _IQ17atan2(A, B) -#endif -#if GLOBAL_IQ == 16 -#define _IQatan2(A, B) _IQ16atan2(A, B) -#endif -#if GLOBAL_IQ == 15 -#define _IQatan2(A, B) _IQ15atan2(A, B) -#endif -#if GLOBAL_IQ == 14 -#define _IQatan2(A, B) _IQ14atan2(A, B) -#endif -#if GLOBAL_IQ == 13 -#define _IQatan2(A, B) _IQ13atan2(A, B) -#endif -#if GLOBAL_IQ == 12 -#define _IQatan2(A, B) _IQ12atan2(A, B) -#endif -#if GLOBAL_IQ == 11 -#define _IQatan2(A, B) _IQ11atan2(A, B) -#endif -#if GLOBAL_IQ == 10 -#define _IQatan2(A, B) _IQ10atan2(A, B) -#endif -#if GLOBAL_IQ == 9 -#define _IQatan2(A, B) _IQ9atan2(A, B) -#endif -#if GLOBAL_IQ == 8 -#define _IQatan2(A, B) _IQ8atan2(A, B) -#endif -#if GLOBAL_IQ == 7 -#define _IQatan2(A, B) _IQ7atan2(A, B) -#endif -#if GLOBAL_IQ == 6 -#define _IQatan2(A, B) _IQ6atan2(A, B) -#endif -#if GLOBAL_IQ == 5 -#define _IQatan2(A, B) _IQ5atan2(A, B) -#endif -#if GLOBAL_IQ == 4 -#define _IQatan2(A, B) _IQ4atan2(A, B) -#endif -#if GLOBAL_IQ == 3 -#define _IQatan2(A, B) _IQ3atan2(A, B) -#endif -#if GLOBAL_IQ == 2 -#define _IQatan2(A, B) _IQ2atan2(A, B) -#endif -#if GLOBAL_IQ == 1 -#define _IQatan2(A, B) _IQ1atan2(A, B) -#endif - -//***************************************************************************** -// -// Computes the arctan of a coordinate specified by two IQ numbers, returning -// the value in cycles per unit instead of radians. -// -//***************************************************************************** -extern _iq30 _IQ30atan2PU(_iq30 A, _iq30 B); -extern _iq29 _IQ29atan2PU(_iq29 A, _iq29 B); -extern _iq28 _IQ28atan2PU(_iq28 A, _iq28 B); -extern _iq27 _IQ27atan2PU(_iq27 A, _iq27 B); -extern _iq26 _IQ26atan2PU(_iq26 A, _iq26 B); -extern _iq25 _IQ25atan2PU(_iq25 A, _iq25 B); -extern _iq24 _IQ24atan2PU(_iq24 A, _iq24 B); -extern _iq23 _IQ23atan2PU(_iq23 A, _iq23 B); -extern _iq22 _IQ22atan2PU(_iq22 A, _iq22 B); -extern _iq21 _IQ21atan2PU(_iq21 A, _iq21 B); -extern _iq20 _IQ20atan2PU(_iq20 A, _iq20 B); -extern _iq19 _IQ19atan2PU(_iq19 A, _iq19 B); -extern _iq18 _IQ18atan2PU(_iq18 A, _iq18 B); -extern _iq17 _IQ17atan2PU(_iq17 A, _iq17 B); -extern _iq16 _IQ16atan2PU(_iq16 A, _iq16 B); -extern _iq15 _IQ15atan2PU(_iq15 A, _iq15 B); -extern _iq14 _IQ14atan2PU(_iq14 A, _iq14 B); -extern _iq13 _IQ13atan2PU(_iq13 A, _iq13 B); -extern _iq12 _IQ12atan2PU(_iq12 A, _iq12 B); -extern _iq11 _IQ11atan2PU(_iq11 A, _iq11 B); -extern _iq10 _IQ10atan2PU(_iq10 A, _iq10 B); -extern _iq9 _IQ9atan2PU(_iq9 A, _iq9 B); -extern _iq8 _IQ8atan2PU(_iq8 A, _iq8 B); -extern _iq7 _IQ7atan2PU(_iq7 A, _iq7 B); -extern _iq6 _IQ6atan2PU(_iq6 A, _iq6 B); -extern _iq5 _IQ5atan2PU(_iq5 A, _iq5 B); -extern _iq4 _IQ4atan2PU(_iq4 A, _iq4 B); -extern _iq3 _IQ3atan2PU(_iq3 A, _iq3 B); -extern _iq2 _IQ2atan2PU(_iq2 A, _iq2 B); -extern _iq1 _IQ1atan2PU(_iq1 A, _iq1 B); - -#if GLOBAL_IQ == 30 -#define _IQatan2PU(A, B) _IQ30atan2PU(A, B) -#endif -#if GLOBAL_IQ == 29 -#define _IQatan2PU(A, B) _IQ29atan2PU(A, B) -#endif -#if GLOBAL_IQ == 28 -#define _IQatan2PU(A, B) _IQ28atan2PU(A, B) -#endif -#if GLOBAL_IQ == 27 -#define _IQatan2PU(A, B) _IQ27atan2PU(A, B) -#endif -#if GLOBAL_IQ == 26 -#define _IQatan2PU(A, B) _IQ26atan2PU(A, B) -#endif -#if GLOBAL_IQ == 25 -#define _IQatan2PU(A, B) _IQ25atan2PU(A, B) -#endif -#if GLOBAL_IQ == 24 -#define _IQatan2PU(A, B) _IQ24atan2PU(A, B) -#endif -#if GLOBAL_IQ == 23 -#define _IQatan2PU(A, B) _IQ23atan2PU(A, B) -#endif -#if GLOBAL_IQ == 22 -#define _IQatan2PU(A, B) _IQ22atan2PU(A, B) -#endif -#if GLOBAL_IQ == 21 -#define _IQatan2PU(A, B) _IQ21atan2PU(A, B) -#endif -#if GLOBAL_IQ == 20 -#define _IQatan2PU(A, B) _IQ20atan2PU(A, B) -#endif -#if GLOBAL_IQ == 19 -#define _IQatan2PU(A, B) _IQ19atan2PU(A, B) -#endif -#if GLOBAL_IQ == 18 -#define _IQatan2PU(A, B) _IQ18atan2PU(A, B) -#endif -#if GLOBAL_IQ == 17 -#define _IQatan2PU(A, B) _IQ17atan2PU(A, B) -#endif -#if GLOBAL_IQ == 16 -#define _IQatan2PU(A, B) _IQ16atan2PU(A, B) -#endif -#if GLOBAL_IQ == 15 -#define _IQatan2PU(A, B) _IQ15atan2PU(A, B) -#endif -#if GLOBAL_IQ == 14 -#define _IQatan2PU(A, B) _IQ14atan2PU(A, B) -#endif -#if GLOBAL_IQ == 13 -#define _IQatan2PU(A, B) _IQ13atan2PU(A, B) -#endif -#if GLOBAL_IQ == 12 -#define _IQatan2PU(A, B) _IQ12atan2PU(A, B) -#endif -#if GLOBAL_IQ == 11 -#define _IQatan2PU(A, B) _IQ11atan2PU(A, B) -#endif -#if GLOBAL_IQ == 10 -#define _IQatan2PU(A, B) _IQ10atan2PU(A, B) -#endif -#if GLOBAL_IQ == 9 -#define _IQatan2PU(A, B) _IQ9atan2PU(A, B) -#endif -#if GLOBAL_IQ == 8 -#define _IQatan2PU(A, B) _IQ8atan2PU(A, B) -#endif -#if GLOBAL_IQ == 7 -#define _IQatan2PU(A, B) _IQ7atan2PU(A, B) -#endif -#if GLOBAL_IQ == 6 -#define _IQatan2PU(A, B) _IQ6atan2PU(A, B) -#endif -#if GLOBAL_IQ == 5 -#define _IQatan2PU(A, B) _IQ5atan2PU(A, B) -#endif -#if GLOBAL_IQ == 4 -#define _IQatan2PU(A, B) _IQ4atan2PU(A, B) -#endif -#if GLOBAL_IQ == 3 -#define _IQatan2PU(A, B) _IQ3atan2PU(A, B) -#endif -#if GLOBAL_IQ == 2 -#define _IQatan2PU(A, B) _IQ2atan2PU(A, B) -#endif -#if GLOBAL_IQ == 1 -#define _IQatan2PU(A, B) _IQ1atan2PU(A, B) -#endif - -//***************************************************************************** -// -// Computes the arctan of an IQ number. -// -//***************************************************************************** -#define _IQ29atan(A) _IQ29atan2(A, _IQ29(1.0)) -#define _IQ28atan(A) _IQ28atan2(A, _IQ28(1.0)) -#define _IQ27atan(A) _IQ27atan2(A, _IQ27(1.0)) -#define _IQ26atan(A) _IQ26atan2(A, _IQ26(1.0)) -#define _IQ25atan(A) _IQ25atan2(A, _IQ25(1.0)) -#define _IQ24atan(A) _IQ24atan2(A, _IQ24(1.0)) -#define _IQ23atan(A) _IQ23atan2(A, _IQ23(1.0)) -#define _IQ22atan(A) _IQ22atan2(A, _IQ22(1.0)) -#define _IQ21atan(A) _IQ21atan2(A, _IQ21(1.0)) -#define _IQ20atan(A) _IQ20atan2(A, _IQ20(1.0)) -#define _IQ19atan(A) _IQ19atan2(A, _IQ19(1.0)) -#define _IQ18atan(A) _IQ18atan2(A, _IQ18(1.0)) -#define _IQ17atan(A) _IQ17atan2(A, _IQ17(1.0)) -#define _IQ16atan(A) _IQ16atan2(A, _IQ16(1.0)) -#define _IQ15atan(A) _IQ15atan2(A, _IQ15(1.0)) -#define _IQ14atan(A) _IQ14atan2(A, _IQ14(1.0)) -#define _IQ13atan(A) _IQ13atan2(A, _IQ13(1.0)) -#define _IQ12atan(A) _IQ12atan2(A, _IQ12(1.0)) -#define _IQ11atan(A) _IQ11atan2(A, _IQ11(1.0)) -#define _IQ10atan(A) _IQ10atan2(A, _IQ10(1.0)) -#define _IQ9atan(A) _IQ9atan2(A, _IQ9(1.0)) -#define _IQ8atan(A) _IQ8atan2(A, _IQ8(1.0)) -#define _IQ7atan(A) _IQ7atan2(A, _IQ7(1.0)) -#define _IQ6atan(A) _IQ6atan2(A, _IQ6(1.0)) -#define _IQ5atan(A) _IQ5atan2(A, _IQ5(1.0)) -#define _IQ4atan(A) _IQ4atan2(A, _IQ4(1.0)) -#define _IQ3atan(A) _IQ3atan2(A, _IQ3(1.0)) -#define _IQ2atan(A) _IQ2atan2(A, _IQ2(1.0)) -#define _IQ1atan(A) _IQ1atan2(A, _IQ1(1.0)) - -#if GLOBAL_IQ == 29 -#define _IQatan(A) _IQ29atan2(A, _IQ29(1.0)) -#endif -#if GLOBAL_IQ == 28 -#define _IQatan(A) _IQ28atan2(A, _IQ28(1.0)) -#endif -#if GLOBAL_IQ == 27 -#define _IQatan(A) _IQ27atan2(A, _IQ27(1.0)) -#endif -#if GLOBAL_IQ == 26 -#define _IQatan(A) _IQ26atan2(A, _IQ26(1.0)) -#endif -#if GLOBAL_IQ == 25 -#define _IQatan(A) _IQ25atan2(A, _IQ25(1.0)) -#endif -#if GLOBAL_IQ == 24 -#define _IQatan(A) _IQ24atan2(A, _IQ24(1.0)) -#endif -#if GLOBAL_IQ == 23 -#define _IQatan(A) _IQ23atan2(A, _IQ23(1.0)) -#endif -#if GLOBAL_IQ == 22 -#define _IQatan(A) _IQ22atan2(A, _IQ22(1.0)) -#endif -#if GLOBAL_IQ == 21 -#define _IQatan(A) _IQ21atan2(A, _IQ21(1.0)) -#endif -#if GLOBAL_IQ == 20 -#define _IQatan(A) _IQ20atan2(A, _IQ20(1.0)) -#endif -#if GLOBAL_IQ == 19 -#define _IQatan(A) _IQ19atan2(A, _IQ19(1.0)) -#endif -#if GLOBAL_IQ == 18 -#define _IQatan(A) _IQ18atan2(A, _IQ18(1.0)) -#endif -#if GLOBAL_IQ == 17 -#define _IQatan(A) _IQ17atan2(A, _IQ17(1.0)) -#endif -#if GLOBAL_IQ == 16 -#define _IQatan(A) _IQ16atan2(A, _IQ16(1.0)) -#endif -#if GLOBAL_IQ == 15 -#define _IQatan(A) _IQ15atan2(A, _IQ15(1.0)) -#endif -#if GLOBAL_IQ == 14 -#define _IQatan(A) _IQ14atan2(A, _IQ14(1.0)) -#endif -#if GLOBAL_IQ == 13 -#define _IQatan(A) _IQ13atan2(A, _IQ13(1.0)) -#endif -#if GLOBAL_IQ == 12 -#define _IQatan(A) _IQ12atan2(A, _IQ12(1.0)) -#endif -#if GLOBAL_IQ == 11 -#define _IQatan(A) _IQ11atan2(A, _IQ11(1.0)) -#endif -#if GLOBAL_IQ == 10 -#define _IQatan(A) _IQ10atan2(A, _IQ10(1.0)) -#endif -#if GLOBAL_IQ == 9 -#define _IQatan(A) _IQ9atan2(A, _IQ9(1.0)) -#endif -#if GLOBAL_IQ == 8 -#define _IQatan(A) _IQ8atan2(A, _IQ8(1.0)) -#endif -#if GLOBAL_IQ == 7 -#define _IQatan(A) _IQ7atan2(A, _IQ7(1.0)) -#endif -#if GLOBAL_IQ == 6 -#define _IQatan(A) _IQ6atan2(A, _IQ6(1.0)) -#endif -#if GLOBAL_IQ == 5 -#define _IQatan(A) _IQ5atan2(A, _IQ5(1.0)) -#endif -#if GLOBAL_IQ == 4 -#define _IQatan(A) _IQ4atan2(A, _IQ4(1.0)) -#endif -#if GLOBAL_IQ == 3 -#define _IQatan(A) _IQ3atan2(A, _IQ3(1.0)) -#endif -#if GLOBAL_IQ == 2 -#define _IQatan(A) _IQ2atan2(A, _IQ2(1.0)) -#endif -#if GLOBAL_IQ == 1 -#define _IQatan(A) _IQ1atan2(A, _IQ1(1.0)) -#endif - -//***************************************************************************** -// -// Computes the square root of an IQ number. -// -//***************************************************************************** -extern _iq30 _IQ30sqrt(_iq30 A); -extern _iq29 _IQ29sqrt(_iq29 A); -extern _iq28 _IQ28sqrt(_iq28 A); -extern _iq27 _IQ27sqrt(_iq27 A); -extern _iq26 _IQ26sqrt(_iq26 A); -extern _iq25 _IQ25sqrt(_iq25 A); -extern _iq24 _IQ24sqrt(_iq24 A); -extern _iq23 _IQ23sqrt(_iq23 A); -extern _iq22 _IQ22sqrt(_iq22 A); -extern _iq21 _IQ21sqrt(_iq21 A); -extern _iq20 _IQ20sqrt(_iq20 A); -extern _iq19 _IQ19sqrt(_iq19 A); -extern _iq18 _IQ18sqrt(_iq18 A); -extern _iq17 _IQ17sqrt(_iq17 A); -extern _iq16 _IQ16sqrt(_iq16 A); -extern _iq15 _IQ15sqrt(_iq15 A); -extern _iq14 _IQ14sqrt(_iq14 A); -extern _iq13 _IQ13sqrt(_iq13 A); -extern _iq12 _IQ12sqrt(_iq12 A); -extern _iq11 _IQ11sqrt(_iq11 A); -extern _iq10 _IQ10sqrt(_iq10 A); -extern _iq9 _IQ9sqrt(_iq9 A); -extern _iq8 _IQ8sqrt(_iq8 A); -extern _iq7 _IQ7sqrt(_iq7 A); -extern _iq6 _IQ6sqrt(_iq6 A); -extern _iq5 _IQ5sqrt(_iq5 A); -extern _iq4 _IQ4sqrt(_iq4 A); -extern _iq3 _IQ3sqrt(_iq3 A); -extern _iq2 _IQ2sqrt(_iq2 A); -extern _iq1 _IQ1sqrt(_iq1 A); - -#if GLOBAL_IQ == 30 -#define _IQsqrt(A) _IQ30sqrt(A) -#endif -#if GLOBAL_IQ == 29 -#define _IQsqrt(A) _IQ29sqrt(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQsqrt(A) _IQ28sqrt(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQsqrt(A) _IQ27sqrt(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQsqrt(A) _IQ26sqrt(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQsqrt(A) _IQ25sqrt(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQsqrt(A) _IQ24sqrt(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQsqrt(A) _IQ23sqrt(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQsqrt(A) _IQ22sqrt(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQsqrt(A) _IQ21sqrt(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQsqrt(A) _IQ20sqrt(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQsqrt(A) _IQ19sqrt(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQsqrt(A) _IQ18sqrt(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQsqrt(A) _IQ17sqrt(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQsqrt(A) _IQ16sqrt(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQsqrt(A) _IQ15sqrt(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQsqrt(A) _IQ14sqrt(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQsqrt(A) _IQ13sqrt(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQsqrt(A) _IQ12sqrt(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQsqrt(A) _IQ11sqrt(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQsqrt(A) _IQ10sqrt(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQsqrt(A) _IQ9sqrt(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQsqrt(A) _IQ8sqrt(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQsqrt(A) _IQ7sqrt(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQsqrt(A) _IQ6sqrt(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQsqrt(A) _IQ5sqrt(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQsqrt(A) _IQ4sqrt(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQsqrt(A) _IQ3sqrt(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQsqrt(A) _IQ2sqrt(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQsqrt(A) _IQ1sqrt(A) -#endif - -//***************************************************************************** -// -// Computes 1 over the square root of an IQ number. -// -//***************************************************************************** -extern _iq30 _IQ30isqrt(_iq30 A); -extern _iq29 _IQ29isqrt(_iq29 A); -extern _iq28 _IQ28isqrt(_iq28 A); -extern _iq27 _IQ27isqrt(_iq27 A); -extern _iq26 _IQ26isqrt(_iq26 A); -extern _iq25 _IQ25isqrt(_iq25 A); -extern _iq24 _IQ24isqrt(_iq24 A); -extern _iq23 _IQ23isqrt(_iq23 A); -extern _iq22 _IQ22isqrt(_iq22 A); -extern _iq21 _IQ21isqrt(_iq21 A); -extern _iq20 _IQ20isqrt(_iq20 A); -extern _iq19 _IQ19isqrt(_iq19 A); -extern _iq18 _IQ18isqrt(_iq18 A); -extern _iq17 _IQ17isqrt(_iq17 A); -extern _iq16 _IQ16isqrt(_iq16 A); -extern _iq15 _IQ15isqrt(_iq15 A); -extern _iq14 _IQ14isqrt(_iq14 A); -extern _iq13 _IQ13isqrt(_iq13 A); -extern _iq12 _IQ12isqrt(_iq12 A); -extern _iq11 _IQ11isqrt(_iq11 A); -extern _iq10 _IQ10isqrt(_iq10 A); -extern _iq9 _IQ9isqrt(_iq9 A); -extern _iq8 _IQ8isqrt(_iq8 A); -extern _iq7 _IQ7isqrt(_iq7 A); -extern _iq6 _IQ6isqrt(_iq6 A); -extern _iq5 _IQ5isqrt(_iq5 A); -extern _iq4 _IQ4isqrt(_iq4 A); -extern _iq3 _IQ3isqrt(_iq3 A); -extern _iq2 _IQ2isqrt(_iq2 A); -extern _iq1 _IQ1isqrt(_iq1 A); - -#if GLOBAL_IQ == 30 -#define _IQisqrt(A) _IQ30isqrt(A) -#endif -#if GLOBAL_IQ == 29 -#define _IQisqrt(A) _IQ29isqrt(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQisqrt(A) _IQ28isqrt(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQisqrt(A) _IQ27isqrt(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQisqrt(A) _IQ26isqrt(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQisqrt(A) _IQ25isqrt(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQisqrt(A) _IQ24isqrt(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQisqrt(A) _IQ23isqrt(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQisqrt(A) _IQ22isqrt(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQisqrt(A) _IQ21isqrt(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQisqrt(A) _IQ20isqrt(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQisqrt(A) _IQ19isqrt(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQisqrt(A) _IQ18isqrt(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQisqrt(A) _IQ17isqrt(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQisqrt(A) _IQ16isqrt(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQisqrt(A) _IQ15isqrt(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQisqrt(A) _IQ14isqrt(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQisqrt(A) _IQ13isqrt(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQisqrt(A) _IQ12isqrt(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQisqrt(A) _IQ11isqrt(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQisqrt(A) _IQ10isqrt(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQisqrt(A) _IQ9isqrt(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQisqrt(A) _IQ8isqrt(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQisqrt(A) _IQ7isqrt(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQisqrt(A) _IQ6isqrt(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQisqrt(A) _IQ5isqrt(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQisqrt(A) _IQ4isqrt(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQisqrt(A) _IQ3isqrt(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQisqrt(A) _IQ2isqrt(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQisqrt(A) _IQ1isqrt(A) -#endif - -//***************************************************************************** -// -// Computes e^x of an IQ number. -// -//***************************************************************************** -extern _iq30 _IQ30exp(_iq30 A); -extern _iq29 _IQ29exp(_iq29 A); -extern _iq28 _IQ28exp(_iq28 A); -extern _iq27 _IQ27exp(_iq27 A); -extern _iq26 _IQ26exp(_iq26 A); -extern _iq25 _IQ25exp(_iq25 A); -extern _iq24 _IQ24exp(_iq24 A); -extern _iq23 _IQ23exp(_iq23 A); -extern _iq22 _IQ22exp(_iq22 A); -extern _iq21 _IQ21exp(_iq21 A); -extern _iq20 _IQ20exp(_iq20 A); -extern _iq19 _IQ19exp(_iq19 A); -extern _iq18 _IQ18exp(_iq18 A); -extern _iq17 _IQ17exp(_iq17 A); -extern _iq16 _IQ16exp(_iq16 A); -extern _iq15 _IQ15exp(_iq15 A); -extern _iq14 _IQ14exp(_iq14 A); -extern _iq13 _IQ13exp(_iq13 A); -extern _iq12 _IQ12exp(_iq12 A); -extern _iq11 _IQ11exp(_iq11 A); -extern _iq10 _IQ10exp(_iq10 A); -extern _iq9 _IQ9exp(_iq9 A); -extern _iq8 _IQ8exp(_iq8 A); -extern _iq7 _IQ7exp(_iq7 A); -extern _iq6 _IQ6exp(_iq6 A); -extern _iq5 _IQ5exp(_iq5 A); -extern _iq4 _IQ4exp(_iq4 A); -extern _iq3 _IQ3exp(_iq3 A); -extern _iq2 _IQ2exp(_iq2 A); -extern _iq1 _IQ1exp(_iq1 A); - -#if GLOBAL_IQ == 30 -#define _IQexp(A) _IQ30exp(A) -#endif -#if GLOBAL_IQ == 29 -#define _IQexp(A) _IQ29exp(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQexp(A) _IQ28exp(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQexp(A) _IQ27exp(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQexp(A) _IQ26exp(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQexp(A) _IQ25exp(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQexp(A) _IQ24exp(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQexp(A) _IQ23exp(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQexp(A) _IQ22exp(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQexp(A) _IQ21exp(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQexp(A) _IQ20exp(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQexp(A) _IQ19exp(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQexp(A) _IQ18exp(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQexp(A) _IQ17exp(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQexp(A) _IQ16exp(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQexp(A) _IQ15exp(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQexp(A) _IQ14exp(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQexp(A) _IQ13exp(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQexp(A) _IQ12exp(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQexp(A) _IQ11exp(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQexp(A) _IQ10exp(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQexp(A) _IQ9exp(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQexp(A) _IQ8exp(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQexp(A) _IQ7exp(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQexp(A) _IQ6exp(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQexp(A) _IQ5exp(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQexp(A) _IQ4exp(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQexp(A) _IQ3exp(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQexp(A) _IQ2exp(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQexp(A) _IQ1exp(A) -#endif - -//***************************************************************************** -// -// Computes log(x) of an IQ number. -// -//***************************************************************************** -extern _iq30 _IQ30log(_iq30 A); -extern _iq29 _IQ29log(_iq29 A); -extern _iq28 _IQ28log(_iq28 A); -extern _iq27 _IQ27log(_iq27 A); -extern _iq26 _IQ26log(_iq26 A); -extern _iq25 _IQ25log(_iq25 A); -extern _iq24 _IQ24log(_iq24 A); -extern _iq23 _IQ23log(_iq23 A); -extern _iq22 _IQ22log(_iq22 A); -extern _iq21 _IQ21log(_iq21 A); -extern _iq20 _IQ20log(_iq20 A); -extern _iq19 _IQ19log(_iq19 A); -extern _iq18 _IQ18log(_iq18 A); -extern _iq17 _IQ17log(_iq17 A); -extern _iq16 _IQ16log(_iq16 A); -extern _iq15 _IQ15log(_iq15 A); -extern _iq14 _IQ14log(_iq14 A); -extern _iq13 _IQ13log(_iq13 A); -extern _iq12 _IQ12log(_iq12 A); -extern _iq11 _IQ11log(_iq11 A); -extern _iq10 _IQ10log(_iq10 A); -extern _iq9 _IQ9log(_iq9 A); -extern _iq8 _IQ8log(_iq8 A); -extern _iq7 _IQ7log(_iq7 A); -extern _iq6 _IQ6log(_iq6 A); -extern _iq5 _IQ5log(_iq5 A); -extern _iq4 _IQ4log(_iq4 A); -extern _iq3 _IQ3log(_iq3 A); -extern _iq2 _IQ2log(_iq2 A); -extern _iq1 _IQ1log(_iq1 A); - -#if GLOBAL_IQ == 30 -#define _IQlog(A) _IQ30log(A) -#endif -#if GLOBAL_IQ == 29 -#define _IQlog(A) _IQ29log(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQlog(A) _IQ28log(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQlog(A) _IQ27log(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQlog(A) _IQ26log(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQlog(A) _IQ25log(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQlog(A) _IQ24log(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQlog(A) _IQ23log(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQlog(A) _IQ22log(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQlog(A) _IQ21log(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQlog(A) _IQ20log(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQlog(A) _IQ19log(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQlog(A) _IQ18log(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQlog(A) _IQ17log(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQlog(A) _IQ16log(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQlog(A) _IQ15log(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQlog(A) _IQ14log(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQlog(A) _IQ13log(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQlog(A) _IQ12log(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQlog(A) _IQ11log(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQlog(A) _IQ10log(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQlog(A) _IQ9log(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQlog(A) _IQ8log(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQlog(A) _IQ7log(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQlog(A) _IQ6log(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQlog(A) _IQ5log(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQlog(A) _IQ4log(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQlog(A) _IQ3log(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQlog(A) _IQ2log(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQlog(A) _IQ1log(A) -#endif - -//***************************************************************************** -// -// Returns the integer portion of an IQ number. -// -//***************************************************************************** -#define _IQ30int(A) ((A) >> 30) -#define _IQ29int(A) ((A) >> 29) -#define _IQ28int(A) ((A) >> 28) -#define _IQ27int(A) ((A) >> 27) -#define _IQ26int(A) ((A) >> 26) -#define _IQ25int(A) ((A) >> 25) -#define _IQ24int(A) ((A) >> 24) -#define _IQ23int(A) ((A) >> 23) -#define _IQ22int(A) ((A) >> 22) -#define _IQ21int(A) ((A) >> 21) -#define _IQ20int(A) ((A) >> 20) -#define _IQ19int(A) ((A) >> 19) -#define _IQ18int(A) ((A) >> 18) -#define _IQ17int(A) ((A) >> 17) -#define _IQ16int(A) ((A) >> 16) -#define _IQ15int(A) ((A) >> 15) -#define _IQ14int(A) ((A) >> 14) -#define _IQ13int(A) ((A) >> 13) -#define _IQ12int(A) ((A) >> 12) -#define _IQ11int(A) ((A) >> 11) -#define _IQ10int(A) ((A) >> 10) -#define _IQ9int(A) ((A) >> 9) -#define _IQ8int(A) ((A) >> 8) -#define _IQ7int(A) ((A) >> 7) -#define _IQ6int(A) ((A) >> 6) -#define _IQ5int(A) ((A) >> 5) -#define _IQ4int(A) ((A) >> 4) -#define _IQ3int(A) ((A) >> 3) -#define _IQ2int(A) ((A) >> 2) -#define _IQ1int(A) ((A) >> 1) -#define _IQint(A) ((A) >> GLOBAL_IQ) - -//***************************************************************************** -// -// Computes the fractional portion of an IQ number. -// -//***************************************************************************** -extern _iq30 _IQ30frac(_iq30 A); -extern _iq29 _IQ29frac(_iq29 A); -extern _iq28 _IQ28frac(_iq28 A); -extern _iq27 _IQ27frac(_iq27 A); -extern _iq26 _IQ26frac(_iq26 A); -extern _iq25 _IQ25frac(_iq25 A); -extern _iq24 _IQ24frac(_iq24 A); -extern _iq23 _IQ23frac(_iq23 A); -extern _iq22 _IQ22frac(_iq22 A); -extern _iq21 _IQ21frac(_iq21 A); -extern _iq20 _IQ20frac(_iq20 A); -extern _iq19 _IQ19frac(_iq19 A); -extern _iq18 _IQ18frac(_iq18 A); -extern _iq17 _IQ17frac(_iq17 A); -extern _iq16 _IQ16frac(_iq16 A); -extern _iq15 _IQ15frac(_iq15 A); -extern _iq14 _IQ14frac(_iq14 A); -extern _iq13 _IQ13frac(_iq13 A); -extern _iq12 _IQ12frac(_iq12 A); -extern _iq11 _IQ11frac(_iq11 A); -extern _iq10 _IQ10frac(_iq10 A); -extern _iq9 _IQ9frac(_iq9 A); -extern _iq8 _IQ8frac(_iq8 A); -extern _iq7 _IQ7frac(_iq7 A); -extern _iq6 _IQ6frac(_iq6 A); -extern _iq5 _IQ5frac(_iq5 A); -extern _iq4 _IQ4frac(_iq4 A); -extern _iq3 _IQ3frac(_iq3 A); -extern _iq2 _IQ2frac(_iq2 A); -extern _iq1 _IQ1frac(_iq1 A); - -#if GLOBAL_IQ == 30 -#define _IQfrac(A) _IQ30frac(A) -#endif -#if GLOBAL_IQ == 29 -#define _IQfrac(A) _IQ29frac(A) -#endif -#if GLOBAL_IQ == 28 -#define _IQfrac(A) _IQ28frac(A) -#endif -#if GLOBAL_IQ == 27 -#define _IQfrac(A) _IQ27frac(A) -#endif -#if GLOBAL_IQ == 26 -#define _IQfrac(A) _IQ26frac(A) -#endif -#if GLOBAL_IQ == 25 -#define _IQfrac(A) _IQ25frac(A) -#endif -#if GLOBAL_IQ == 24 -#define _IQfrac(A) _IQ24frac(A) -#endif -#if GLOBAL_IQ == 23 -#define _IQfrac(A) _IQ23frac(A) -#endif -#if GLOBAL_IQ == 22 -#define _IQfrac(A) _IQ22frac(A) -#endif -#if GLOBAL_IQ == 21 -#define _IQfrac(A) _IQ21frac(A) -#endif -#if GLOBAL_IQ == 20 -#define _IQfrac(A) _IQ20frac(A) -#endif -#if GLOBAL_IQ == 19 -#define _IQfrac(A) _IQ19frac(A) -#endif -#if GLOBAL_IQ == 18 -#define _IQfrac(A) _IQ18frac(A) -#endif -#if GLOBAL_IQ == 17 -#define _IQfrac(A) _IQ17frac(A) -#endif -#if GLOBAL_IQ == 16 -#define _IQfrac(A) _IQ16frac(A) -#endif -#if GLOBAL_IQ == 15 -#define _IQfrac(A) _IQ15frac(A) -#endif -#if GLOBAL_IQ == 14 -#define _IQfrac(A) _IQ14frac(A) -#endif -#if GLOBAL_IQ == 13 -#define _IQfrac(A) _IQ13frac(A) -#endif -#if GLOBAL_IQ == 12 -#define _IQfrac(A) _IQ12frac(A) -#endif -#if GLOBAL_IQ == 11 -#define _IQfrac(A) _IQ11frac(A) -#endif -#if GLOBAL_IQ == 10 -#define _IQfrac(A) _IQ10frac(A) -#endif -#if GLOBAL_IQ == 9 -#define _IQfrac(A) _IQ9frac(A) -#endif -#if GLOBAL_IQ == 8 -#define _IQfrac(A) _IQ8frac(A) -#endif -#if GLOBAL_IQ == 7 -#define _IQfrac(A) _IQ7frac(A) -#endif -#if GLOBAL_IQ == 6 -#define _IQfrac(A) _IQ6frac(A) -#endif -#if GLOBAL_IQ == 5 -#define _IQfrac(A) _IQ5frac(A) -#endif -#if GLOBAL_IQ == 4 -#define _IQfrac(A) _IQ4frac(A) -#endif -#if GLOBAL_IQ == 3 -#define _IQfrac(A) _IQ3frac(A) -#endif -#if GLOBAL_IQ == 2 -#define _IQfrac(A) _IQ2frac(A) -#endif -#if GLOBAL_IQ == 1 -#define _IQfrac(A) _IQ1frac(A) -#endif - -//***************************************************************************** -// -// Multiplies two IQ numbers in the specified iQ formats, returning the result -// in another IQ format. -// -//***************************************************************************** -extern int32_t _IQ30mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ29mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ28mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ27mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ26mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ25mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ24mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ23mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ22mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ21mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ20mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ19mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ18mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ17mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ16mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ15mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ14mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ13mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ12mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ11mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ10mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ9mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ8mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ7mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ6mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ5mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ4mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ3mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ2mpyIQX(int32_t A, int n1, int32_t B, int n2); -extern int32_t _IQ1mpyIQX(int32_t A, int n1, int32_t B, int n2); - -#if GLOBAL_IQ == 30 -#define _IQmpyIQX(A, n1, B, n2) _IQ30mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 29 -#define _IQmpyIQX(A, n1, B, n2) _IQ29mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 28 -#define _IQmpyIQX(A, n1, B, n2) _IQ28mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 27 -#define _IQmpyIQX(A, n1, B, n2) _IQ27mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 26 -#define _IQmpyIQX(A, n1, B, n2) _IQ26mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 25 -#define _IQmpyIQX(A, n1, B, n2) _IQ25mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 24 -#define _IQmpyIQX(A, n1, B, n2) _IQ24mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 23 -#define _IQmpyIQX(A, n1, B, n2) _IQ23mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 22 -#define _IQmpyIQX(A, n1, B, n2) _IQ22mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 21 -#define _IQmpyIQX(A, n1, B, n2) _IQ21mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 20 -#define _IQmpyIQX(A, n1, B, n2) _IQ20mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 19 -#define _IQmpyIQX(A, n1, B, n2) _IQ19mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 18 -#define _IQmpyIQX(A, n1, B, n2) _IQ18mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 17 -#define _IQmpyIQX(A, n1, B, n2) _IQ17mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 16 -#define _IQmpyIQX(A, n1, B, n2) _IQ16mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 15 -#define _IQmpyIQX(A, n1, B, n2) _IQ15mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 14 -#define _IQmpyIQX(A, n1, B, n2) _IQ14mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 13 -#define _IQmpyIQX(A, n1, B, n2) _IQ13mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 12 -#define _IQmpyIQX(A, n1, B, n2) _IQ12mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 11 -#define _IQmpyIQX(A, n1, B, n2) _IQ11mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 10 -#define _IQmpyIQX(A, n1, B, n2) _IQ10mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 9 -#define _IQmpyIQX(A, n1, B, n2) _IQ9mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 8 -#define _IQmpyIQX(A, n1, B, n2) _IQ8mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 7 -#define _IQmpyIQX(A, n1, B, n2) _IQ7mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 6 -#define _IQmpyIQX(A, n1, B, n2) _IQ6mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 5 -#define _IQmpyIQX(A, n1, B, n2) _IQ5mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 4 -#define _IQmpyIQX(A, n1, B, n2) _IQ4mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 3 -#define _IQmpyIQX(A, n1, B, n2) _IQ3mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 2 -#define _IQmpyIQX(A, n1, B, n2) _IQ2mpyIQX(A, n1, B, n2) -#endif -#if GLOBAL_IQ == 1 -#define _IQmpyIQX(A, n1, B, n2) _IQ1mpyIQX(A, n1, B, n2) -#endif - -//***************************************************************************** -// -// Multiplies an IQ number by an integer. -// -//***************************************************************************** -#define _IQ30mpyI32(A, B) ((A) * (B)) -#define _IQ29mpyI32(A, B) ((A) * (B)) -#define _IQ28mpyI32(A, B) ((A) * (B)) -#define _IQ27mpyI32(A, B) ((A) * (B)) -#define _IQ26mpyI32(A, B) ((A) * (B)) -#define _IQ25mpyI32(A, B) ((A) * (B)) -#define _IQ24mpyI32(A, B) ((A) * (B)) -#define _IQ23mpyI32(A, B) ((A) * (B)) -#define _IQ22mpyI32(A, B) ((A) * (B)) -#define _IQ21mpyI32(A, B) ((A) * (B)) -#define _IQ20mpyI32(A, B) ((A) * (B)) -#define _IQ19mpyI32(A, B) ((A) * (B)) -#define _IQ18mpyI32(A, B) ((A) * (B)) -#define _IQ17mpyI32(A, B) ((A) * (B)) -#define _IQ16mpyI32(A, B) ((A) * (B)) -#define _IQ15mpyI32(A, B) ((A) * (B)) -#define _IQ14mpyI32(A, B) ((A) * (B)) -#define _IQ13mpyI32(A, B) ((A) * (B)) -#define _IQ12mpyI32(A, B) ((A) * (B)) -#define _IQ11mpyI32(A, B) ((A) * (B)) -#define _IQ10mpyI32(A, B) ((A) * (B)) -#define _IQ9mpyI32(A, B) ((A) * (B)) -#define _IQ8mpyI32(A, B) ((A) * (B)) -#define _IQ7mpyI32(A, B) ((A) * (B)) -#define _IQ6mpyI32(A, B) ((A) * (B)) -#define _IQ5mpyI32(A, B) ((A) * (B)) -#define _IQ4mpyI32(A, B) ((A) * (B)) -#define _IQ3mpyI32(A, B) ((A) * (B)) -#define _IQ2mpyI32(A, B) ((A) * (B)) -#define _IQ1mpyI32(A, B) ((A) * (B)) -#define _IQmpyI32(A, B) ((A) * (B)) - -//***************************************************************************** -// -// Multiplies an IQ number by an integer, and returns the integer portion. -// -//***************************************************************************** -#define _IQ30mpyI32int(A, B) _IQ30int(_IQ30mpyI32(A, B)) -#define _IQ29mpyI32int(A, B) _IQ29int(_IQ29mpyI32(A, B)) -#define _IQ28mpyI32int(A, B) _IQ28int(_IQ28mpyI32(A, B)) -#define _IQ27mpyI32int(A, B) _IQ27int(_IQ27mpyI32(A, B)) -#define _IQ26mpyI32int(A, B) _IQ26int(_IQ26mpyI32(A, B)) -#define _IQ25mpyI32int(A, B) _IQ25int(_IQ25mpyI32(A, B)) -#define _IQ24mpyI32int(A, B) _IQ24int(_IQ24mpyI32(A, B)) -#define _IQ23mpyI32int(A, B) _IQ23int(_IQ23mpyI32(A, B)) -#define _IQ22mpyI32int(A, B) _IQ22int(_IQ22mpyI32(A, B)) -#define _IQ21mpyI32int(A, B) _IQ21int(_IQ21mpyI32(A, B)) -#define _IQ20mpyI32int(A, B) _IQ20int(_IQ20mpyI32(A, B)) -#define _IQ19mpyI32int(A, B) _IQ19int(_IQ19mpyI32(A, B)) -#define _IQ18mpyI32int(A, B) _IQ18int(_IQ18mpyI32(A, B)) -#define _IQ17mpyI32int(A, B) _IQ17int(_IQ17mpyI32(A, B)) -#define _IQ16mpyI32int(A, B) _IQ16int(_IQ16mpyI32(A, B)) -#define _IQ15mpyI32int(A, B) _IQ15int(_IQ15mpyI32(A, B)) -#define _IQ14mpyI32int(A, B) _IQ14int(_IQ14mpyI32(A, B)) -#define _IQ13mpyI32int(A, B) _IQ13int(_IQ13mpyI32(A, B)) -#define _IQ12mpyI32int(A, B) _IQ12int(_IQ12mpyI32(A, B)) -#define _IQ11mpyI32int(A, B) _IQ11int(_IQ11mpyI32(A, B)) -#define _IQ10mpyI32int(A, B) _IQ10int(_IQ10mpyI32(A, B)) -#define _IQ9mpyI32int(A, B) _IQ9int(_IQ9mpyI32(A, B)) -#define _IQ8mpyI32int(A, B) _IQ8int(_IQ8mpyI32(A, B)) -#define _IQ7mpyI32int(A, B) _IQ7int(_IQ7mpyI32(A, B)) -#define _IQ6mpyI32int(A, B) _IQ6int(_IQ6mpyI32(A, B)) -#define _IQ5mpyI32int(A, B) _IQ5int(_IQ5mpyI32(A, B)) -#define _IQ4mpyI32int(A, B) _IQ4int(_IQ4mpyI32(A, B)) -#define _IQ3mpyI32int(A, B) _IQ3int(_IQ3mpyI32(A, B)) -#define _IQ2mpyI32int(A, B) _IQ2int(_IQ2mpyI32(A, B)) -#define _IQ1mpyI32int(A, B) _IQ1int(_IQ1mpyI32(A, B)) - -#if GLOBAL_IQ == 30 -#define _IQmpyI32int(A, B) _IQ30mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 29 -#define _IQmpyI32int(A, B) _IQ29mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 28 -#define _IQmpyI32int(A, B) _IQ28mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 27 -#define _IQmpyI32int(A, B) _IQ27mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 26 -#define _IQmpyI32int(A, B) _IQ26mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 25 -#define _IQmpyI32int(A, B) _IQ25mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 24 -#define _IQmpyI32int(A, B) _IQ24mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 23 -#define _IQmpyI32int(A, B) _IQ23mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 22 -#define _IQmpyI32int(A, B) _IQ22mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 21 -#define _IQmpyI32int(A, B) _IQ21mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 20 -#define _IQmpyI32int(A, B) _IQ20mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 19 -#define _IQmpyI32int(A, B) _IQ19mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 18 -#define _IQmpyI32int(A, B) _IQ18mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 17 -#define _IQmpyI32int(A, B) _IQ17mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 16 -#define _IQmpyI32int(A, B) _IQ16mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 15 -#define _IQmpyI32int(A, B) _IQ15mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 14 -#define _IQmpyI32int(A, B) _IQ14mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 13 -#define _IQmpyI32int(A, B) _IQ13mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 12 -#define _IQmpyI32int(A, B) _IQ12mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 11 -#define _IQmpyI32int(A, B) _IQ11mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 10 -#define _IQmpyI32int(A, B) _IQ10mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 9 -#define _IQmpyI32int(A, B) _IQ9mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 8 -#define _IQmpyI32int(A, B) _IQ8mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 7 -#define _IQmpyI32int(A, B) _IQ7mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 6 -#define _IQmpyI32int(A, B) _IQ6mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 5 -#define _IQmpyI32int(A, B) _IQ5mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 4 -#define _IQmpyI32int(A, B) _IQ4mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 3 -#define _IQmpyI32int(A, B) _IQ3mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 2 -#define _IQmpyI32int(A, B) _IQ2mpyI32int(A, B) -#endif -#if GLOBAL_IQ == 1 -#define _IQmpyI32int(A, B) _IQ1mpyI32int(A, B) -#endif - -//***************************************************************************** -// -// Multiplies an IQ number by an integer, and returns the fractional portion. -// -//***************************************************************************** -#define _IQ30mpyI32frac(A, B) _IQ30frac(_IQ30mpyI32(A, B)) -#define _IQ29mpyI32frac(A, B) _IQ29frac(_IQ29mpyI32(A, B)) -#define _IQ28mpyI32frac(A, B) _IQ28frac(_IQ28mpyI32(A, B)) -#define _IQ27mpyI32frac(A, B) _IQ27frac(_IQ27mpyI32(A, B)) -#define _IQ26mpyI32frac(A, B) _IQ26frac(_IQ26mpyI32(A, B)) -#define _IQ25mpyI32frac(A, B) _IQ25frac(_IQ25mpyI32(A, B)) -#define _IQ24mpyI32frac(A, B) _IQ24frac(_IQ24mpyI32(A, B)) -#define _IQ23mpyI32frac(A, B) _IQ23frac(_IQ23mpyI32(A, B)) -#define _IQ22mpyI32frac(A, B) _IQ22frac(_IQ22mpyI32(A, B)) -#define _IQ21mpyI32frac(A, B) _IQ21frac(_IQ21mpyI32(A, B)) -#define _IQ20mpyI32frac(A, B) _IQ20frac(_IQ20mpyI32(A, B)) -#define _IQ19mpyI32frac(A, B) _IQ19frac(_IQ19mpyI32(A, B)) -#define _IQ18mpyI32frac(A, B) _IQ18frac(_IQ18mpyI32(A, B)) -#define _IQ17mpyI32frac(A, B) _IQ17frac(_IQ17mpyI32(A, B)) -#define _IQ16mpyI32frac(A, B) _IQ16frac(_IQ16mpyI32(A, B)) -#define _IQ15mpyI32frac(A, B) _IQ15frac(_IQ15mpyI32(A, B)) -#define _IQ14mpyI32frac(A, B) _IQ14frac(_IQ14mpyI32(A, B)) -#define _IQ13mpyI32frac(A, B) _IQ13frac(_IQ13mpyI32(A, B)) -#define _IQ12mpyI32frac(A, B) _IQ12frac(_IQ12mpyI32(A, B)) -#define _IQ11mpyI32frac(A, B) _IQ11frac(_IQ11mpyI32(A, B)) -#define _IQ10mpyI32frac(A, B) _IQ10frac(_IQ10mpyI32(A, B)) -#define _IQ9mpyI32frac(A, B) _IQ9frac(_IQ9mpyI32(A, B)) -#define _IQ8mpyI32frac(A, B) _IQ8frac(_IQ8mpyI32(A, B)) -#define _IQ7mpyI32frac(A, B) _IQ7frac(_IQ7mpyI32(A, B)) -#define _IQ6mpyI32frac(A, B) _IQ6frac(_IQ6mpyI32(A, B)) -#define _IQ5mpyI32frac(A, B) _IQ5frac(_IQ5mpyI32(A, B)) -#define _IQ4mpyI32frac(A, B) _IQ4frac(_IQ4mpyI32(A, B)) -#define _IQ3mpyI32frac(A, B) _IQ3frac(_IQ3mpyI32(A, B)) -#define _IQ2mpyI32frac(A, B) _IQ2frac(_IQ2mpyI32(A, B)) -#define _IQ1mpyI32frac(A, B) _IQ1frac(_IQ1mpyI32(A, B)) - -#if GLOBAL_IQ == 30 -#define _IQmpyI32frac(A, B) _IQ30mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 29 -#define _IQmpyI32frac(A, B) _IQ29mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 28 -#define _IQmpyI32frac(A, B) _IQ28mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 27 -#define _IQmpyI32frac(A, B) _IQ27mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 26 -#define _IQmpyI32frac(A, B) _IQ26mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 25 -#define _IQmpyI32frac(A, B) _IQ25mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 24 -#define _IQmpyI32frac(A, B) _IQ24mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 23 -#define _IQmpyI32frac(A, B) _IQ23mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 22 -#define _IQmpyI32frac(A, B) _IQ22mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 21 -#define _IQmpyI32frac(A, B) _IQ21mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 20 -#define _IQmpyI32frac(A, B) _IQ20mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 19 -#define _IQmpyI32frac(A, B) _IQ19mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 18 -#define _IQmpyI32frac(A, B) _IQ18mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 17 -#define _IQmpyI32frac(A, B) _IQ17mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 16 -#define _IQmpyI32frac(A, B) _IQ16mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 15 -#define _IQmpyI32frac(A, B) _IQ15mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 14 -#define _IQmpyI32frac(A, B) _IQ14mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 13 -#define _IQmpyI32frac(A, B) _IQ13mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 12 -#define _IQmpyI32frac(A, B) _IQ12mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 11 -#define _IQmpyI32frac(A, B) _IQ11mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 10 -#define _IQmpyI32frac(A, B) _IQ10mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 9 -#define _IQmpyI32frac(A, B) _IQ9mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 8 -#define _IQmpyI32frac(A, B) _IQ8mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 7 -#define _IQmpyI32frac(A, B) _IQ7mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 6 -#define _IQmpyI32frac(A, B) _IQ6mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 5 -#define _IQmpyI32frac(A, B) _IQ5mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 4 -#define _IQmpyI32frac(A, B) _IQ4mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 3 -#define _IQmpyI32frac(A, B) _IQ3mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 2 -#define _IQmpyI32frac(A, B) _IQ2mpyI32frac(A, B) -#endif -#if GLOBAL_IQ == 1 -#define _IQmpyI32frac(A, B) _IQ1mpyI32frac(A, B) -#endif - -//***************************************************************************** -// -// Computes the square root of A^2 + B^2 using IQ numbers. -// -//***************************************************************************** -extern int32_t _IQmag(int32_t A, int32_t B); -#define _IQ30mag(A, B) _IQmag(A, B) -#define _IQ29mag(A, B) _IQmag(A, B) -#define _IQ28mag(A, B) _IQmag(A, B) -#define _IQ27mag(A, B) _IQmag(A, B) -#define _IQ26mag(A, B) _IQmag(A, B) -#define _IQ25mag(A, B) _IQmag(A, B) -#define _IQ24mag(A, B) _IQmag(A, B) -#define _IQ23mag(A, B) _IQmag(A, B) -#define _IQ22mag(A, B) _IQmag(A, B) -#define _IQ21mag(A, B) _IQmag(A, B) -#define _IQ20mag(A, B) _IQmag(A, B) -#define _IQ19mag(A, B) _IQmag(A, B) -#define _IQ18mag(A, B) _IQmag(A, B) -#define _IQ17mag(A, B) _IQmag(A, B) -#define _IQ16mag(A, B) _IQmag(A, B) -#define _IQ15mag(A, B) _IQmag(A, B) -#define _IQ14mag(A, B) _IQmag(A, B) -#define _IQ13mag(A, B) _IQmag(A, B) -#define _IQ12mag(A, B) _IQmag(A, B) -#define _IQ11mag(A, B) _IQmag(A, B) -#define _IQ10mag(A, B) _IQmag(A, B) -#define _IQ9mag(A, B) _IQmag(A, B) -#define _IQ8mag(A, B) _IQmag(A, B) -#define _IQ7mag(A, B) _IQmag(A, B) -#define _IQ6mag(A, B) _IQmag(A, B) -#define _IQ5mag(A, B) _IQmag(A, B) -#define _IQ4mag(A, B) _IQmag(A, B) -#define _IQ3mag(A, B) _IQmag(A, B) -#define _IQ2mag(A, B) _IQmag(A, B) -#define _IQ1mag(A, B) _IQmag(A, B) - -//***************************************************************************** -// -// Computes the inverse square root of A^2 + B^2 using IQ numbers. -// -//***************************************************************************** -extern _iq29 _IQ30imag(_iq30 A, _iq30 B); -extern _iq29 _IQ29imag(_iq29 A, _iq29 B); -extern _iq28 _IQ28imag(_iq28 A, _iq28 B); -extern _iq27 _IQ27imag(_iq27 A, _iq27 B); -extern _iq26 _IQ26imag(_iq26 A, _iq26 B); -extern _iq25 _IQ25imag(_iq25 A, _iq25 B); -extern _iq24 _IQ24imag(_iq24 A, _iq24 B); -extern _iq23 _IQ23imag(_iq23 A, _iq23 B); -extern _iq22 _IQ22imag(_iq22 A, _iq22 B); -extern _iq21 _IQ21imag(_iq21 A, _iq21 B); -extern _iq20 _IQ20imag(_iq20 A, _iq20 B); -extern _iq19 _IQ19imag(_iq19 A, _iq19 B); -extern _iq18 _IQ18imag(_iq18 A, _iq18 B); -extern _iq17 _IQ17imag(_iq17 A, _iq17 B); -extern _iq16 _IQ16imag(_iq16 A, _iq16 B); -extern _iq15 _IQ15imag(_iq15 A, _iq15 B); -extern _iq14 _IQ14imag(_iq14 A, _iq14 B); -extern _iq13 _IQ13imag(_iq13 A, _iq13 B); -extern _iq12 _IQ12imag(_iq12 A, _iq12 B); -extern _iq11 _IQ11imag(_iq11 A, _iq11 B); -extern _iq10 _IQ10imag(_iq10 A, _iq10 B); -extern _iq9 _IQ9imag(_iq9 A, _iq9 B); -extern _iq8 _IQ8imag(_iq8 A, _iq8 B); -extern _iq7 _IQ7imag(_iq7 A, _iq7 B); -extern _iq6 _IQ6imag(_iq6 A, _iq6 B); -extern _iq5 _IQ5imag(_iq5 A, _iq5 B); -extern _iq4 _IQ4imag(_iq4 A, _iq4 B); -extern _iq3 _IQ3imag(_iq3 A, _iq3 B); -extern _iq2 _IQ2imag(_iq2 A, _iq2 B); -extern _iq1 _IQ1imag(_iq1 A, _iq1 B); - -#if GLOBAL_IQ == 30 -#define _IQimag(A, B) _IQ30imag(A, B) -#endif -#if GLOBAL_IQ == 29 -#define _IQimag(A, B) _IQ29imag(A, B) -#endif -#if GLOBAL_IQ == 28 -#define _IQimag(A, B) _IQ28imag(A, B) -#endif -#if GLOBAL_IQ == 27 -#define _IQimag(A, B) _IQ27imag(A, B) -#endif -#if GLOBAL_IQ == 26 -#define _IQimag(A, B) _IQ26imag(A, B) -#endif -#if GLOBAL_IQ == 25 -#define _IQimag(A, B) _IQ25imag(A, B) -#endif -#if GLOBAL_IQ == 24 -#define _IQimag(A, B) _IQ24imag(A, B) -#endif -#if GLOBAL_IQ == 23 -#define _IQimag(A, B) _IQ23imag(A, B) -#endif -#if GLOBAL_IQ == 22 -#define _IQimag(A, B) _IQ22imag(A, B) -#endif -#if GLOBAL_IQ == 21 -#define _IQimag(A, B) _IQ21imag(A, B) -#endif -#if GLOBAL_IQ == 20 -#define _IQimag(A, B) _IQ20imag(A, B) -#endif -#if GLOBAL_IQ == 19 -#define _IQimag(A, B) _IQ19imag(A, B) -#endif -#if GLOBAL_IQ == 18 -#define _IQimag(A, B) _IQ18imag(A, B) -#endif -#if GLOBAL_IQ == 17 -#define _IQimag(A, B) _IQ17imag(A, B) -#endif -#if GLOBAL_IQ == 16 -#define _IQimag(A, B) _IQ16imag(A, B) -#endif -#if GLOBAL_IQ == 15 -#define _IQimag(A, B) _IQ15imag(A, B) -#endif -#if GLOBAL_IQ == 14 -#define _IQimag(A, B) _IQ14imag(A, B) -#endif -#if GLOBAL_IQ == 13 -#define _IQimag(A, B) _IQ13imag(A, B) -#endif -#if GLOBAL_IQ == 12 -#define _IQimag(A, B) _IQ12imag(A, B) -#endif -#if GLOBAL_IQ == 11 -#define _IQimag(A, B) _IQ11imag(A, B) -#endif -#if GLOBAL_IQ == 10 -#define _IQimag(A, B) _IQ10imag(A, B) -#endif -#if GLOBAL_IQ == 9 -#define _IQimag(A, B) _IQ9imag(A, B) -#endif -#if GLOBAL_IQ == 8 -#define _IQimag(A, B) _IQ8imag(A, B) -#endif -#if GLOBAL_IQ == 7 -#define _IQimag(A, B) _IQ7imag(A, B) -#endif -#if GLOBAL_IQ == 6 -#define _IQimag(A, B) _IQ6imag(A, B) -#endif -#if GLOBAL_IQ == 5 -#define _IQimag(A, B) _IQ5imag(A, B) -#endif -#if GLOBAL_IQ == 4 -#define _IQimag(A, B) _IQ4imag(A, B) -#endif -#if GLOBAL_IQ == 3 -#define _IQimag(A, B) _IQ3imag(A, B) -#endif -#if GLOBAL_IQ == 2 -#define _IQimag(A, B) _IQ2imag(A, B) -#endif -#if GLOBAL_IQ == 1 -#define _IQimag(A, B) _IQ1imag(A, B) -#endif - -//***************************************************************************** -// -// Converts a string into an IQ number. -// -//***************************************************************************** -extern _iq30 _atoIQ30(const char *A); -extern _iq29 _atoIQ29(const char *A); -extern _iq28 _atoIQ28(const char *A); -extern _iq27 _atoIQ27(const char *A); -extern _iq26 _atoIQ26(const char *A); -extern _iq25 _atoIQ25(const char *A); -extern _iq24 _atoIQ24(const char *A); -extern _iq23 _atoIQ23(const char *A); -extern _iq22 _atoIQ22(const char *A); -extern _iq21 _atoIQ21(const char *A); -extern _iq20 _atoIQ20(const char *A); -extern _iq19 _atoIQ19(const char *A); -extern _iq18 _atoIQ18(const char *A); -extern _iq17 _atoIQ17(const char *A); -extern _iq16 _atoIQ16(const char *A); -extern _iq15 _atoIQ15(const char *A); -extern _iq14 _atoIQ14(const char *A); -extern _iq13 _atoIQ13(const char *A); -extern _iq12 _atoIQ12(const char *A); -extern _iq11 _atoIQ11(const char *A); -extern _iq10 _atoIQ10(const char *A); -extern _iq9 _atoIQ9(const char *A); -extern _iq8 _atoIQ8(const char *A); -extern _iq7 _atoIQ7(const char *A); -extern _iq6 _atoIQ6(const char *A); -extern _iq5 _atoIQ5(const char *A); -extern _iq4 _atoIQ4(const char *A); -extern _iq3 _atoIQ3(const char *A); -extern _iq2 _atoIQ2(const char *A); -extern _iq1 _atoIQ1(const char *A); - -#if GLOBAL_IQ == 30 -#define _atoIQ(A) _atoIQ30(A) -#endif -#if GLOBAL_IQ == 29 -#define _atoIQ(A) _atoIQ29(A) -#endif -#if GLOBAL_IQ == 28 -#define _atoIQ(A) _atoIQ28(A) -#endif -#if GLOBAL_IQ == 27 -#define _atoIQ(A) _atoIQ27(A) -#endif -#if GLOBAL_IQ == 26 -#define _atoIQ(A) _atoIQ26(A) -#endif -#if GLOBAL_IQ == 25 -#define _atoIQ(A) _atoIQ25(A) -#endif -#if GLOBAL_IQ == 24 -#define _atoIQ(A) _atoIQ24(A) -#endif -#if GLOBAL_IQ == 23 -#define _atoIQ(A) _atoIQ23(A) -#endif -#if GLOBAL_IQ == 22 -#define _atoIQ(A) _atoIQ22(A) -#endif -#if GLOBAL_IQ == 21 -#define _atoIQ(A) _atoIQ21(A) -#endif -#if GLOBAL_IQ == 20 -#define _atoIQ(A) _atoIQ20(A) -#endif -#if GLOBAL_IQ == 19 -#define _atoIQ(A) _atoIQ19(A) -#endif -#if GLOBAL_IQ == 18 -#define _atoIQ(A) _atoIQ18(A) -#endif -#if GLOBAL_IQ == 17 -#define _atoIQ(A) _atoIQ17(A) -#endif -#if GLOBAL_IQ == 16 -#define _atoIQ(A) _atoIQ16(A) -#endif -#if GLOBAL_IQ == 15 -#define _atoIQ(A) _atoIQ15(A) -#endif -#if GLOBAL_IQ == 14 -#define _atoIQ(A) _atoIQ14(A) -#endif -#if GLOBAL_IQ == 13 -#define _atoIQ(A) _atoIQ13(A) -#endif -#if GLOBAL_IQ == 12 -#define _atoIQ(A) _atoIQ12(A) -#endif -#if GLOBAL_IQ == 11 -#define _atoIQ(A) _atoIQ11(A) -#endif -#if GLOBAL_IQ == 10 -#define _atoIQ(A) _atoIQ10(A) -#endif -#if GLOBAL_IQ == 9 -#define _atoIQ(A) _atoIQ9(A) -#endif -#if GLOBAL_IQ == 8 -#define _atoIQ(A) _atoIQ8(A) -#endif -#if GLOBAL_IQ == 7 -#define _atoIQ(A) _atoIQ7(A) -#endif -#if GLOBAL_IQ == 6 -#define _atoIQ(A) _atoIQ6(A) -#endif -#if GLOBAL_IQ == 5 -#define _atoIQ(A) _atoIQ5(A) -#endif -#if GLOBAL_IQ == 4 -#define _atoIQ(A) _atoIQ4(A) -#endif -#if GLOBAL_IQ == 3 -#define _atoIQ(A) _atoIQ3(A) -#endif -#if GLOBAL_IQ == 2 -#define _atoIQ(A) _atoIQ2(A) -#endif -#if GLOBAL_IQ == 1 -#define _atoIQ(A) _atoIQ1(A) -#endif - -//***************************************************************************** -// -// Converts an IQ number into a string. -// -//***************************************************************************** -extern int16_t _IQ30toa(char *string, const char *format, _iq30 input); -extern int16_t _IQ29toa(char *string, const char *format, _iq29 input); -extern int16_t _IQ28toa(char *string, const char *format, _iq28 input); -extern int16_t _IQ27toa(char *string, const char *format, _iq27 input); -extern int16_t _IQ26toa(char *string, const char *format, _iq26 input); -extern int16_t _IQ25toa(char *string, const char *format, _iq25 input); -extern int16_t _IQ24toa(char *string, const char *format, _iq24 input); -extern int16_t _IQ23toa(char *string, const char *format, _iq23 input); -extern int16_t _IQ22toa(char *string, const char *format, _iq22 input); -extern int16_t _IQ21toa(char *string, const char *format, _iq21 input); -extern int16_t _IQ20toa(char *string, const char *format, _iq20 input); -extern int16_t _IQ19toa(char *string, const char *format, _iq19 input); -extern int16_t _IQ18toa(char *string, const char *format, _iq18 input); -extern int16_t _IQ17toa(char *string, const char *format, _iq17 input); -extern int16_t _IQ16toa(char *string, const char *format, _iq16 input); -extern int16_t _IQ15toa(char *string, const char *format, _iq15 input); -extern int16_t _IQ14toa(char *string, const char *format, _iq14 input); -extern int16_t _IQ13toa(char *string, const char *format, _iq13 input); -extern int16_t _IQ12toa(char *string, const char *format, _iq12 input); -extern int16_t _IQ11toa(char *string, const char *format, _iq11 input); -extern int16_t _IQ10toa(char *string, const char *format, _iq10 input); -extern int16_t _IQ9toa(char *string, const char *format, _iq9 input); -extern int16_t _IQ8toa(char *string, const char *format, _iq8 input); -extern int16_t _IQ7toa(char *string, const char *format, _iq7 input); -extern int16_t _IQ6toa(char *string, const char *format, _iq6 input); -extern int16_t _IQ5toa(char *string, const char *format, _iq5 input); -extern int16_t _IQ4toa(char *string, const char *format, _iq4 input); -extern int16_t _IQ3toa(char *string, const char *format, _iq3 input); -extern int16_t _IQ2toa(char *string, const char *format, _iq2 input); -extern int16_t _IQ1toa(char *string, const char *format, _iq1 input); - -#if GLOBAL_IQ == 30 -#define _IQtoa(A, B, C) _IQ30toa(A, B, C) -#endif -#if GLOBAL_IQ == 29 -#define _IQtoa(A, B, C) _IQ29toa(A, B, C) -#endif -#if GLOBAL_IQ == 28 -#define _IQtoa(A, B, C) _IQ28toa(A, B, C) -#endif -#if GLOBAL_IQ == 27 -#define _IQtoa(A, B, C) _IQ27toa(A, B, C) -#endif -#if GLOBAL_IQ == 26 -#define _IQtoa(A, B, C) _IQ26toa(A, B, C) -#endif -#if GLOBAL_IQ == 25 -#define _IQtoa(A, B, C) _IQ25toa(A, B, C) -#endif -#if GLOBAL_IQ == 24 -#define _IQtoa(A, B, C) _IQ24toa(A, B, C) -#endif -#if GLOBAL_IQ == 23 -#define _IQtoa(A, B, C) _IQ23toa(A, B, C) -#endif -#if GLOBAL_IQ == 22 -#define _IQtoa(A, B, C) _IQ22toa(A, B, C) -#endif -#if GLOBAL_IQ == 21 -#define _IQtoa(A, B, C) _IQ21toa(A, B, C) -#endif -#if GLOBAL_IQ == 20 -#define _IQtoa(A, B, C) _IQ20toa(A, B, C) -#endif -#if GLOBAL_IQ == 19 -#define _IQtoa(A, B, C) _IQ19toa(A, B, C) -#endif -#if GLOBAL_IQ == 18 -#define _IQtoa(A, B, C) _IQ18toa(A, B, C) -#endif -#if GLOBAL_IQ == 17 -#define _IQtoa(A, B, C) _IQ17toa(A, B, C) -#endif -#if GLOBAL_IQ == 16 -#define _IQtoa(A, B, C) _IQ16toa(A, B, C) -#endif -#if GLOBAL_IQ == 15 -#define _IQtoa(A, B, C) _IQ15toa(A, B, C) -#endif -#if GLOBAL_IQ == 14 -#define _IQtoa(A, B, C) _IQ14toa(A, B, C) -#endif -#if GLOBAL_IQ == 13 -#define _IQtoa(A, B, C) _IQ13toa(A, B, C) -#endif -#if GLOBAL_IQ == 12 -#define _IQtoa(A, B, C) _IQ12toa(A, B, C) -#endif -#if GLOBAL_IQ == 11 -#define _IQtoa(A, B, C) _IQ11toa(A, B, C) -#endif -#if GLOBAL_IQ == 10 -#define _IQtoa(A, B, C) _IQ10toa(A, B, C) -#endif -#if GLOBAL_IQ == 9 -#define _IQtoa(A, B, C) _IQ9toa(A, B, C) -#endif -#if GLOBAL_IQ == 8 -#define _IQtoa(A, B, C) _IQ8toa(A, B, C) -#endif -#if GLOBAL_IQ == 7 -#define _IQtoa(A, B, C) _IQ7toa(A, B, C) -#endif -#if GLOBAL_IQ == 6 -#define _IQtoa(A, B, C) _IQ6toa(A, B, C) -#endif -#if GLOBAL_IQ == 5 -#define _IQtoa(A, B, C) _IQ5toa(A, B, C) -#endif -#if GLOBAL_IQ == 4 -#define _IQtoa(A, B, C) _IQ4toa(A, B, C) -#endif -#if GLOBAL_IQ == 3 -#define _IQtoa(A, B, C) _IQ3toa(A, B, C) -#endif -#if GLOBAL_IQ == 2 -#define _IQtoa(A, B, C) _IQ2toa(A, B, C) -#endif -#if GLOBAL_IQ == 1 -#define _IQtoa(A, B, C) _IQ1toa(A, B, C) -#endif - -//***************************************************************************** -// -// Computes the absolute value of an IQ number. -// -//***************************************************************************** -#define _IQ30abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ29abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ28abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ27abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ26abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ25abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ24abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ23abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ22abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ21abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ20abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ19abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ18abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ17abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ16abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ15abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ14abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ13abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ12abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ11abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ10abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ9abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ8abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ7abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ6abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ5abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ4abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ3abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ2abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQ1abs(A) (((A) < 0) ? - (A) : (A)) -#define _IQabs(A) (((A) < 0) ? - (A) : (A)) - -//***************************************************************************** -// -// Mark the end of the C bindings section for C++ compilers. -// -//***************************************************************************** -#ifdef __cplusplus -} -#endif - -#endif // __IQMATHLIB_H__ diff --git a/Include/QmathLib.h b/Include/QmathLib.h deleted file mode 100755 index 21c5cb1..0000000 --- a/Include/QmathLib.h +++ /dev/null @@ -1,2100 +0,0 @@ -/* --COPYRIGHT--,BSD - * Copyright (c) 2015, Texas Instruments Incorporated - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * 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. - * - * * Neither the name of Texas Instruments Incorporated 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 OWNER 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. - * --/COPYRIGHT--*/ -#ifndef __QMATHLIB_H__ -#define __QMATHLIB_H__ - -//***************************************************************************** -// -// If building with a C++ compiler, make all of the definitions in this header -// have a C binding. -// -//***************************************************************************** -#ifdef __cplusplus -extern "C" -{ -#endif - -//***************************************************************************** -// -// The IQ format to be used when the IQ format is not explicitly specified -// (such as _IQcos instead of _IQ16cos). This value must be between 1 and 30, -// inclusive. -// -//***************************************************************************** -#ifndef GLOBAL_Q -#define GLOBAL_Q 3 -#endif - -//***************************************************************************** -// -// Include some standard headers. -// -//***************************************************************************** -#include -#include -#include - -//***************************************************************************** -// -// Various Useful Constant Definitions: -// -//***************************************************************************** -#define Q15 15 -#define Q14 14 -#define Q13 13 -#define Q12 12 -#define Q11 11 -#define Q10 10 -#define Q9 9 -#define Q8 8 -#define Q7 7 -#define Q6 6 -#define Q5 5 -#define Q4 4 -#define Q3 3 -#define Q2 2 -#define Q1 1 -#ifndef QG -#define QG GLOBAL_Q -#endif - -#define MAX_Q_POS INT16_MAX -#define MAX_Q_NEG INT16_MIN -#define MIN_Q_POS 1 -#define MIN_Q_NEG -1 - -//***************************************************************************** -// -// The types for the various Q formats. -// -//***************************************************************************** -typedef int16_t _q15; -typedef int16_t _q14; -typedef int16_t _q13; -typedef int16_t _q12; -typedef int16_t _q11; -typedef int16_t _q10; -typedef int16_t _q9; -typedef int16_t _q8; -typedef int16_t _q7; -typedef int16_t _q6; -typedef int16_t _q5; -typedef int16_t _q4; -typedef int16_t _q3; -typedef int16_t _q2; -typedef int16_t _q1; -typedef int16_t _q; - -//***************************************************************************** -// -// Simple multiplies or divides, which are accomplished with simple shifts. -// -//***************************************************************************** -#define _Qmpy2(A) ((A) << 1) -#define _Qmpy4(A) ((A) << 2) -#define _Qmpy8(A) ((A) << 3) -#define _Qmpy16(A) ((A) << 4) -#define _Qmpy32(A) ((A) << 5) -#define _Qmpy64(A) ((A) << 6) -#define _Qdiv2(A) ((A) >> 1) -#define _Qdiv4(A) ((A) >> 2) -#define _Qdiv8(A) ((A) >> 3) -#define _Qdiv16(A) ((A) >> 4) -#define _Qdiv32(A) ((A) >> 5) -#define _Qdiv64(A) ((A) >> 6) - -//***************************************************************************** -// -// Convert a value into an Q number. -// -//***************************************************************************** -#define _Q15(A) ((_q15)((A) * ((int32_t)1 << 15))) -#define _Q14(A) ((_q14)((A) * ((_q14)1 << 14))) -#define _Q13(A) ((_q13)((A) * ((_q13)1 << 13))) -#define _Q12(A) ((_q12)((A) * ((_q12)1 << 12))) -#define _Q11(A) ((_q11)((A) * ((_q11)1 << 11))) -#define _Q10(A) ((_q10)((A) * ((_q10)1 << 10))) -#define _Q9(A) ((_q9)((A) * ((_q9)1 << 9))) -#define _Q8(A) ((_q8)((A) * ((_q8)1 << 8))) -#define _Q7(A) ((_q7)((A) * ((_q7)1 << 7))) -#define _Q6(A) ((_q6)((A) * ((_q6)1 << 6))) -#define _Q5(A) ((_q5)((A) * ((_q5)1 << 5))) -#define _Q4(A) ((_q4)((A) * ((_q4)1 << 4))) -#define _Q3(A) ((_q3)((A) * ((_q3)1 << 3))) -#define _Q2(A) ((_q2)((A) * ((_q2)1 << 2))) -#define _Q1(A) ((_q1)((A) * ((_q1)1 << 1))) - -#if GLOBAL_Q == 15 -#define _Q(A) _Q15(A) -#endif -#if GLOBAL_Q == 14 -#define _Q(A) _Q14(A) -#endif -#if GLOBAL_Q == 13 -#define _Q(A) _Q13(A) -#endif -#if GLOBAL_Q == 12 -#define _Q(A) _Q12(A) -#endif -#if GLOBAL_Q == 11 -#define _Q(A) _Q11(A) -#endif -#if GLOBAL_Q == 10 -#define _Q(A) _Q10(A) -#endif -#if GLOBAL_Q == 9 -#define _Q(A) _Q9(A) -#endif -#if GLOBAL_Q == 8 -#define _Q(A) _Q8(A) -#endif -#if GLOBAL_Q == 7 -#define _Q(A) _Q7(A) -#endif -#if GLOBAL_Q == 6 -#define _Q(A) _Q6(A) -#endif -#if GLOBAL_Q == 5 -#define _Q(A) _Q5(A) -#endif -#if GLOBAL_Q == 4 -#define _Q(A) _Q4(A) -#endif -#if GLOBAL_Q == 3 -#define _Q(A) _Q3(A) -#endif -#if GLOBAL_Q == 2 -#define _Q(A) _Q2(A) -#endif -#if GLOBAL_Q == 1 -#define _Q(A) _Q1(A) -#endif - -//***************************************************************************** -// -// Convert an Q number to a floating point value. -// -//***************************************************************************** -extern float _Q15toF(_q15 A); -extern float _Q14toF(_q14 A); -extern float _Q13toF(_q13 A); -extern float _Q12toF(_q12 A); -extern float _Q11toF(_q11 A); -extern float _Q10toF(_q10 A); -extern float _Q9toF(_q9 A); -extern float _Q8toF(_q8 A); -extern float _Q7toF(_q7 A); -extern float _Q6toF(_q6 A); -extern float _Q5toF(_q5 A); -extern float _Q4toF(_q4 A); -extern float _Q3toF(_q3 A); -extern float _Q2toF(_q2 A); -extern float _Q1toF(_q1 A); - -#if GLOBAL_Q == 15 -#define _QtoF(A) _Q15toF(A) -#endif -#if GLOBAL_Q == 14 -#define _QtoF(A) _Q14toF(A) -#endif -#if GLOBAL_Q == 13 -#define _QtoF(A) _Q13toF(A) -#endif -#if GLOBAL_Q == 12 -#define _QtoF(A) _Q12toF(A) -#endif -#if GLOBAL_Q == 11 -#define _QtoF(A) _Q11toF(A) -#endif -#if GLOBAL_Q == 10 -#define _QtoF(A) _Q10toF(A) -#endif -#if GLOBAL_Q == 9 -#define _QtoF(A) _Q9toF(A) -#endif -#if GLOBAL_Q == 8 -#define _QtoF(A) _Q8toF(A) -#endif -#if GLOBAL_Q == 7 -#define _QtoF(A) _Q7toF(A) -#endif -#if GLOBAL_Q == 6 -#define _QtoF(A) _Q6toF(A) -#endif -#if GLOBAL_Q == 5 -#define _QtoF(A) _Q5toF(A) -#endif -#if GLOBAL_Q == 4 -#define _QtoF(A) _Q4toF(A) -#endif -#if GLOBAL_Q == 3 -#define _QtoF(A) _Q3toF(A) -#endif -#if GLOBAL_Q == 2 -#define _QtoF(A) _Q2toF(A) -#endif -#if GLOBAL_Q == 1 -#define _QtoF(A) _Q1toF(A) -#endif - -//***************************************************************************** -// -// Saturates an Q number in a given range. -// -//***************************************************************************** -#define _Qsat(A, Pos, Neg) (((A) > (Pos)) ? \ - (Pos) : \ - (((A) < (Neg)) ? (Neg) : (A))) - -//***************************************************************************** -// -// Converts an Q number between the global Q format and a specified Q -// format. -// -//***************************************************************************** - -#if (GLOBAL_Q >= 15) -#define _QtoQ15(A) ((_q15)(A) >> (GLOBAL_Q - 15)) -#define _Q15toQ(A) ((_q15)(A) << (GLOBAL_Q - 15)) -#else -#define _QtoQ15(A) ((_q15)(A) << (15 - GLOBAL_Q)) -#define _Q15toQ(A) ((_q15)(A) >> (15 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 14) -#define _QtoQ14(A) ((_q14)(A) >> (GLOBAL_Q - 14)) -#define _Q14toQ(A) ((_q14)(A) << (GLOBAL_Q - 14)) -#else -#define _QtoQ14(A) ((_q14)(A) << (14 - GLOBAL_Q)) -#define _Q14toQ(A) ((_q14)(A) >> (14 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 13) -#define _QtoQ13(A) ((_q13)(A) >> (GLOBAL_Q - 13)) -#define _Q13toQ(A) ((_q13)(A) << (GLOBAL_Q - 13)) -#else -#define _QtoQ13(A) ((_q13)(A) << (13 - GLOBAL_Q)) -#define _Q13toQ(A) ((_q13)(A) >> (13 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 12) -#define _QtoQ12(A) ((_q12)(A) >> (GLOBAL_Q - 12)) -#define _Q12toQ(A) ((_q12)(A) << (GLOBAL_Q - 12)) -#else -#define _QtoQ12(A) ((_q12)(A) << (12 - GLOBAL_Q)) -#define _Q12toQ(A) ((_q12)(A) >> (12 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 11) -#define _QtoQ11(A) ((_q11)(A) >> (GLOBAL_Q - 11)) -#define _Q11toQ(A) ((_q11)(A) << (GLOBAL_Q - 11)) -#else -#define _QtoQ11(A) ((_q11)(A) << (11 - GLOBAL_Q)) -#define _Q11toQ(A) ((_q11)(A) >> (11 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 10) -#define _QtoQ10(A) ((_q10)(A) >> (GLOBAL_Q - 10)) -#define _Q10toQ(A) ((_q10)(A) << (GLOBAL_Q - 10)) -#else -#define _QtoQ10(A) ((_q10)(A) << (10 - GLOBAL_Q)) -#define _Q10toQ(A) ((_q10)(A) >> (10 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 9) -#define _QtoQ9(A) ((_q9)(A) >> (GLOBAL_Q - 9)) -#define _Q9toQ(A) ((_q9)(A) << (GLOBAL_Q - 9)) -#else -#define _QtoQ9(A) ((_q9)(A) << (9 - GLOBAL_Q)) -#define _Q9toQ(A) ((_q9)(A) >> (9 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 8) -#define _QtoQ8(A) ((_q8)(A) >> (GLOBAL_Q - 8)) -#define _Q8toQ(A) ((_q8)(A) << (GLOBAL_Q - 8)) -#else -#define _QtoQ8(A) ((_q8)(A) << (8 - GLOBAL_Q)) -#define _Q8toQ(A) ((_q8)(A) >> (8 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 7) -#define _QtoQ7(A) ((_q7)(A) >> (GLOBAL_Q - 7)) -#define _Q7toQ(A) ((_q7)(A) << (GLOBAL_Q - 7)) -#else -#define _QtoQ7(A) ((_q7)(A) << (7 - GLOBAL_Q)) -#define _Q7toQ(A) ((_q7)(A) >> (7 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 6) -#define _QtoQ6(A) ((_q6)(A) >> (GLOBAL_Q - 6)) -#define _Q6toQ(A) ((_q6)(A) << (GLOBAL_Q - 6)) -#else -#define _QtoQ6(A) ((_q6)(A) << (6 - GLOBAL_Q)) -#define _Q6toQ(A) ((_q6)(A) >> (6 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 5) -#define _QtoQ5(A) ((_q5)(A) >> (GLOBAL_Q - 5)) -#define _Q5toQ(A) ((_q5)(A) << (GLOBAL_Q - 5)) -#else -#define _QtoQ5(A) ((_q5)(A) << (5 - GLOBAL_Q)) -#define _Q5toQ(A) ((_q5)(A) >> (5 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 4) -#define _QtoQ4(A) ((_q4)(A) >> (GLOBAL_Q - 4)) -#define _Q4toQ(A) ((_q4)(A) << (GLOBAL_Q - 4)) -#else -#define _QtoQ4(A) ((_q4)(A) << (4 - GLOBAL_Q)) -#define _Q4toQ(A) ((_q4)(A) >> (4 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 3) -#define _QtoQ3(A) ((_q3)(A) >> (GLOBAL_Q - 3)) -#define _Q3toQ(A) ((_q3)(A) << (GLOBAL_Q - 3)) -#else -#define _QtoQ3(A) ((_q3)(A) << (3 - GLOBAL_Q)) -#define _Q3toQ(A) ((_q3)(A) >> (3 - GLOBAL_Q)) -#endif - -#if (GLOBAL_Q >= 2) -#define _QtoQ2(A) ((_q2)(A) >> (GLOBAL_Q - 2)) -#define _Q2toQ(A) ((_q2)(A) << (GLOBAL_Q - 2)) -#else -#define _QtoQ2(A) ((_q2)(A) << (2 - GLOBAL_Q)) -#define _Q2toQ(A) ((_q2)(A) >> (2 - GLOBAL_Q)) -#endif - -#define _QtoQ1(A) ((_q1)(A) >> (GLOBAL_Q - 1)) -#define _Q1toQ(A) ((_q1)(A) << (GLOBAL_Q - 1)) - - -//***************************************************************************** -// -// Multiplies two Q numbers. -// -//***************************************************************************** -extern _q15 _Q15mpy(_q15 A, _q15 B); -extern _q14 _Q14mpy(_q14 A, _q14 B); -extern _q13 _Q13mpy(_q13 A, _q13 B); -extern _q12 _Q12mpy(_q12 A, _q12 B); -extern _q11 _Q11mpy(_q11 A, _q11 B); -extern _q10 _Q10mpy(_q10 A, _q10 B); -extern _q9 _Q9mpy(_q9 A, _q9 B); -extern _q8 _Q8mpy(_q8 A, _q8 B); -extern _q7 _Q7mpy(_q7 A, _q7 B); -extern _q6 _Q6mpy(_q6 A, _q6 B); -extern _q5 _Q5mpy(_q5 A, _q5 B); -extern _q4 _Q4mpy(_q4 A, _q4 B); -extern _q3 _Q3mpy(_q3 A, _q3 B); -extern _q2 _Q2mpy(_q2 A, _q2 B); -extern _q1 _Q1mpy(_q1 A, _q1 B); - -#if GLOBAL_Q == 15 -#define _Qmpy(A, B) _Q15mpy(A, B) -#endif -#if GLOBAL_Q == 14 -#define _Qmpy(A, B) _Q14mpy(A, B) -#endif -#if GLOBAL_Q == 13 -#define _Qmpy(A, B) _Q13mpy(A, B) -#endif -#if GLOBAL_Q == 12 -#define _Qmpy(A, B) _Q12mpy(A, B) -#endif -#if GLOBAL_Q == 11 -#define _Qmpy(A, B) _Q11mpy(A, B) -#endif -#if GLOBAL_Q == 10 -#define _Qmpy(A, B) _Q10mpy(A, B) -#endif -#if GLOBAL_Q == 9 -#define _Qmpy(A, B) _Q9mpy(A, B) -#endif -#if GLOBAL_Q == 8 -#define _Qmpy(A, B) _Q8mpy(A, B) -#endif -#if GLOBAL_Q == 7 -#define _Qmpy(A, B) _Q7mpy(A, B) -#endif -#if GLOBAL_Q == 6 -#define _Qmpy(A, B) _Q6mpy(A, B) -#endif -#if GLOBAL_Q == 5 -#define _Qmpy(A, B) _Q5mpy(A, B) -#endif -#if GLOBAL_Q == 4 -#define _Qmpy(A, B) _Q4mpy(A, B) -#endif -#if GLOBAL_Q == 3 -#define _Qmpy(A, B) _Q3mpy(A, B) -#endif -#if GLOBAL_Q == 2 -#define _Qmpy(A, B) _Q2mpy(A, B) -#endif -#if GLOBAL_Q == 1 -#define _Qmpy(A, B) _Q1mpy(A, B) -#endif - -//***************************************************************************** -// -// Multiplies two Q numbers, with rounding. -// -//***************************************************************************** -extern _q15 _Q15rmpy(_q15 A, _q15 B); -extern _q14 _Q14rmpy(_q14 A, _q14 B); -extern _q13 _Q13rmpy(_q13 A, _q13 B); -extern _q12 _Q12rmpy(_q12 A, _q12 B); -extern _q11 _Q11rmpy(_q11 A, _q11 B); -extern _q10 _Q10rmpy(_q10 A, _q10 B); -extern _q9 _Q9rmpy(_q9 A, _q9 B); -extern _q8 _Q8rmpy(_q8 A, _q8 B); -extern _q7 _Q7rmpy(_q7 A, _q7 B); -extern _q6 _Q6rmpy(_q6 A, _q6 B); -extern _q5 _Q5rmpy(_q5 A, _q5 B); -extern _q4 _Q4rmpy(_q4 A, _q4 B); -extern _q3 _Q3rmpy(_q3 A, _q3 B); -extern _q2 _Q2rmpy(_q2 A, _q2 B); -extern _q1 _Q1rmpy(_q1 A, _q1 B); - -#if GLOBAL_Q == 15 -#define _Qrmpy(A, B) _Q15rmpy(A, B) -#endif -#if GLOBAL_Q == 14 -#define _Qrmpy(A, B) _Q14rmpy(A, B) -#endif -#if GLOBAL_Q == 13 -#define _Qrmpy(A, B) _Q13rmpy(A, B) -#endif -#if GLOBAL_Q == 12 -#define _Qrmpy(A, B) _Q12rmpy(A, B) -#endif -#if GLOBAL_Q == 11 -#define _Qrmpy(A, B) _Q11rmpy(A, B) -#endif -#if GLOBAL_Q == 10 -#define _Qrmpy(A, B) _Q10rmpy(A, B) -#endif -#if GLOBAL_Q == 9 -#define _Qrmpy(A, B) _Q9rmpy(A, B) -#endif -#if GLOBAL_Q == 8 -#define _Qrmpy(A, B) _Q8rmpy(A, B) -#endif -#if GLOBAL_Q == 7 -#define _Qrmpy(A, B) _Q7rmpy(A, B) -#endif -#if GLOBAL_Q == 6 -#define _Qrmpy(A, B) _Q6rmpy(A, B) -#endif -#if GLOBAL_Q == 5 -#define _Qrmpy(A, B) _Q5rmpy(A, B) -#endif -#if GLOBAL_Q == 4 -#define _Qrmpy(A, B) _Q4rmpy(A, B) -#endif -#if GLOBAL_Q == 3 -#define _Qrmpy(A, B) _Q3rmpy(A, B) -#endif -#if GLOBAL_Q == 2 -#define _Qrmpy(A, B) _Q2rmpy(A, B) -#endif -#if GLOBAL_Q == 1 -#define _Qrmpy(A, B) _Q1rmpy(A, B) -#endif - -//***************************************************************************** -// -// Multiplies two Q numbers, with rounding and saturation. -// -//***************************************************************************** -extern _q15 _Q15rsmpy(_q15 A, _q15 B); -extern _q14 _Q14rsmpy(_q14 A, _q14 B); -extern _q13 _Q13rsmpy(_q13 A, _q13 B); -extern _q12 _Q12rsmpy(_q12 A, _q12 B); -extern _q11 _Q11rsmpy(_q11 A, _q11 B); -extern _q10 _Q10rsmpy(_q10 A, _q10 B); -extern _q9 _Q9rsmpy(_q9 A, _q9 B); -extern _q8 _Q8rsmpy(_q8 A, _q8 B); -extern _q7 _Q7rsmpy(_q7 A, _q7 B); -extern _q6 _Q6rsmpy(_q6 A, _q6 B); -extern _q5 _Q5rsmpy(_q5 A, _q5 B); -extern _q4 _Q4rsmpy(_q4 A, _q4 B); -extern _q3 _Q3rsmpy(_q3 A, _q3 B); -extern _q2 _Q2rsmpy(_q2 A, _q2 B); -extern _q1 _Q1rsmpy(_q1 A, _q1 B); - -#if GLOBAL_Q == 15 -#define _Qrsmpy(A, B) _Q15rsmpy(A, B) -#endif -#if GLOBAL_Q == 14 -#define _Qrsmpy(A, B) _Q14rsmpy(A, B) -#endif -#if GLOBAL_Q == 13 -#define _Qrsmpy(A, B) _Q13rsmpy(A, B) -#endif -#if GLOBAL_Q == 12 -#define _Qrsmpy(A, B) _Q12rsmpy(A, B) -#endif -#if GLOBAL_Q == 11 -#define _Qrsmpy(A, B) _Q11rsmpy(A, B) -#endif -#if GLOBAL_Q == 10 -#define _Qrsmpy(A, B) _Q10rsmpy(A, B) -#endif -#if GLOBAL_Q == 9 -#define _Qrsmpy(A, B) _Q9rsmpy(A, B) -#endif -#if GLOBAL_Q == 8 -#define _Qrsmpy(A, B) _Q8rsmpy(A, B) -#endif -#if GLOBAL_Q == 7 -#define _Qrsmpy(A, B) _Q7rsmpy(A, B) -#endif -#if GLOBAL_Q == 6 -#define _Qrsmpy(A, B) _Q6rsmpy(A, B) -#endif -#if GLOBAL_Q == 5 -#define _Qrsmpy(A, B) _Q5rsmpy(A, B) -#endif -#if GLOBAL_Q == 4 -#define _Qrsmpy(A, B) _Q4rsmpy(A, B) -#endif -#if GLOBAL_Q == 3 -#define _Qrsmpy(A, B) _Q3rsmpy(A, B) -#endif -#if GLOBAL_Q == 2 -#define _Qrsmpy(A, B) _Q2rsmpy(A, B) -#endif -#if GLOBAL_Q == 1 -#define _Qrsmpy(A, B) _Q1rsmpy(A, B) -#endif - -//***************************************************************************** -// -// Divides two Q numbers. -// -//***************************************************************************** -extern _q15 _Q15div(_q15 A, _q15 B); -extern _q14 _Q14div(_q14 A, _q14 B); -extern _q13 _Q13div(_q13 A, _q13 B); -extern _q12 _Q12div(_q12 A, _q12 B); -extern _q11 _Q11div(_q11 A, _q11 B); -extern _q10 _Q10div(_q10 A, _q10 B); -extern _q9 _Q9div(_q9 A, _q9 B); -extern _q8 _Q8div(_q8 A, _q8 B); -extern _q7 _Q7div(_q7 A, _q7 B); -extern _q6 _Q6div(_q6 A, _q6 B); -extern _q5 _Q5div(_q5 A, _q5 B); -extern _q4 _Q4div(_q4 A, _q4 B); -extern _q3 _Q3div(_q3 A, _q3 B); -extern _q2 _Q2div(_q2 A, _q2 B); -extern _q1 _Q1div(_q1 A, _q1 B); - -#if GLOBAL_Q == 15 -#define _Qdiv(A, B) _Q15div(A, B) -#endif -#if GLOBAL_Q == 14 -#define _Qdiv(A, B) _Q14div(A, B) -#endif -#if GLOBAL_Q == 13 -#define _Qdiv(A, B) _Q13div(A, B) -#endif -#if GLOBAL_Q == 12 -#define _Qdiv(A, B) _Q12div(A, B) -#endif -#if GLOBAL_Q == 11 -#define _Qdiv(A, B) _Q11div(A, B) -#endif -#if GLOBAL_Q == 10 -#define _Qdiv(A, B) _Q10div(A, B) -#endif -#if GLOBAL_Q == 9 -#define _Qdiv(A, B) _Q9div(A, B) -#endif -#if GLOBAL_Q == 8 -#define _Qdiv(A, B) _Q8div(A, B) -#endif -#if GLOBAL_Q == 7 -#define _Qdiv(A, B) _Q7div(A, B) -#endif -#if GLOBAL_Q == 6 -#define _Qdiv(A, B) _Q6div(A, B) -#endif -#if GLOBAL_Q == 5 -#define _Qdiv(A, B) _Q5div(A, B) -#endif -#if GLOBAL_Q == 4 -#define _Qdiv(A, B) _Q4div(A, B) -#endif -#if GLOBAL_Q == 3 -#define _Qdiv(A, B) _Q3div(A, B) -#endif -#if GLOBAL_Q == 2 -#define _Qdiv(A, B) _Q2div(A, B) -#endif -#if GLOBAL_Q == 1 -#define _Qdiv(A, B) _Q1div(A, B) -#endif - -//***************************************************************************** -// -// Computes the sin of an Q number. -// -//***************************************************************************** -extern _q15 _Q15sin(_q15 A); -extern _q14 _Q14sin(_q14 A); -extern _q13 _Q13sin(_q13 A); -extern _q12 _Q12sin(_q12 A); -extern _q11 _Q11sin(_q11 A); -extern _q10 _Q10sin(_q10 A); -extern _q9 _Q9sin(_q9 A); -extern _q8 _Q8sin(_q8 A); -extern _q7 _Q7sin(_q7 A); -extern _q6 _Q6sin(_q6 A); -extern _q5 _Q5sin(_q5 A); -extern _q4 _Q4sin(_q4 A); -extern _q3 _Q3sin(_q3 A); -extern _q2 _Q2sin(_q2 A); -extern _q1 _Q1sin(_q1 A); - -#if GLOBAL_Q == 15 -#define _Qsin(A) _Q15sin(A) -#endif -#if GLOBAL_Q == 14 -#define _Qsin(A) _Q14sin(A) -#endif -#if GLOBAL_Q == 13 -#define _Qsin(A) _Q13sin(A) -#endif -#if GLOBAL_Q == 12 -#define _Qsin(A) _Q12sin(A) -#endif -#if GLOBAL_Q == 11 -#define _Qsin(A) _Q11sin(A) -#endif -#if GLOBAL_Q == 10 -#define _Qsin(A) _Q10sin(A) -#endif -#if GLOBAL_Q == 9 -#define _Qsin(A) _Q9sin(A) -#endif -#if GLOBAL_Q == 8 -#define _Qsin(A) _Q8sin(A) -#endif -#if GLOBAL_Q == 7 -#define _Qsin(A) _Q7sin(A) -#endif -#if GLOBAL_Q == 6 -#define _Qsin(A) _Q6sin(A) -#endif -#if GLOBAL_Q == 5 -#define _Qsin(A) _Q5sin(A) -#endif -#if GLOBAL_Q == 4 -#define _Qsin(A) _Q4sin(A) -#endif -#if GLOBAL_Q == 3 -#define _Qsin(A) _Q3sin(A) -#endif -#if GLOBAL_Q == 2 -#define _Qsin(A) _Q2sin(A) -#endif -#if GLOBAL_Q == 1 -#define _Qsin(A) _Q1sin(A) -#endif - -//***************************************************************************** -// -// Computes the sin of an Q number, using cycles per unit instead of radians. -// -//***************************************************************************** -extern _q15 _Q15sinPU(_q15 A); -extern _q14 _Q14sinPU(_q14 A); -extern _q13 _Q13sinPU(_q13 A); -extern _q12 _Q12sinPU(_q12 A); -extern _q11 _Q11sinPU(_q11 A); -extern _q10 _Q10sinPU(_q10 A); -extern _q9 _Q9sinPU(_q9 A); -extern _q8 _Q8sinPU(_q8 A); -extern _q7 _Q7sinPU(_q7 A); -extern _q6 _Q6sinPU(_q6 A); -extern _q5 _Q5sinPU(_q5 A); -extern _q4 _Q4sinPU(_q4 A); -extern _q3 _Q3sinPU(_q3 A); -extern _q2 _Q2sinPU(_q2 A); -extern _q1 _Q1sinPU(_q1 A); - -#if GLOBAL_Q == 15 -#define _QsinPU(A) _Q15sinPU(A) -#endif -#if GLOBAL_Q == 14 -#define _QsinPU(A) _Q14sinPU(A) -#endif -#if GLOBAL_Q == 13 -#define _QsinPU(A) _Q13sinPU(A) -#endif -#if GLOBAL_Q == 12 -#define _QsinPU(A) _Q12sinPU(A) -#endif -#if GLOBAL_Q == 11 -#define _QsinPU(A) _Q11sinPU(A) -#endif -#if GLOBAL_Q == 10 -#define _QsinPU(A) _Q10sinPU(A) -#endif -#if GLOBAL_Q == 9 -#define _QsinPU(A) _Q9sinPU(A) -#endif -#if GLOBAL_Q == 8 -#define _QsinPU(A) _Q8sinPU(A) -#endif -#if GLOBAL_Q == 7 -#define _QsinPU(A) _Q7sinPU(A) -#endif -#if GLOBAL_Q == 6 -#define _QsinPU(A) _Q6sinPU(A) -#endif -#if GLOBAL_Q == 5 -#define _QsinPU(A) _Q5sinPU(A) -#endif -#if GLOBAL_Q == 4 -#define _QsinPU(A) _Q4sinPU(A) -#endif -#if GLOBAL_Q == 3 -#define _QsinPU(A) _Q3sinPU(A) -#endif -#if GLOBAL_Q == 2 -#define _QsinPU(A) _Q2sinPU(A) -#endif -#if GLOBAL_Q == 1 -#define _QsinPU(A) _Q1sinPU(A) -#endif - -//***************************************************************************** -// -// Computes the arcsin of an Q number. -// -//***************************************************************************** -extern _q14 _Q14asin(_q14 A); -extern _q13 _Q13asin(_q13 A); -extern _q12 _Q12asin(_q12 A); -extern _q11 _Q11asin(_q11 A); -extern _q10 _Q10asin(_q10 A); -extern _q9 _Q9asin(_q9 A); -extern _q8 _Q8asin(_q8 A); -extern _q7 _Q7asin(_q7 A); -extern _q6 _Q6asin(_q6 A); -extern _q5 _Q5asin(_q5 A); -extern _q4 _Q4asin(_q4 A); -extern _q3 _Q3asin(_q3 A); -extern _q2 _Q2asin(_q2 A); -extern _q1 _Q1asin(_q1 A); - -#if GLOBAL_Q == 14 -#define _Qasin(A) _Q14asin(A) -#endif -#if GLOBAL_Q == 13 -#define _Qasin(A) _Q13asin(A) -#endif -#if GLOBAL_Q == 12 -#define _Qasin(A) _Q12asin(A) -#endif -#if GLOBAL_Q == 11 -#define _Qasin(A) _Q11asin(A) -#endif -#if GLOBAL_Q == 10 -#define _Qasin(A) _Q10asin(A) -#endif -#if GLOBAL_Q == 9 -#define _Qasin(A) _Q9asin(A) -#endif -#if GLOBAL_Q == 8 -#define _Qasin(A) _Q8asin(A) -#endif -#if GLOBAL_Q == 7 -#define _Qasin(A) _Q7asin(A) -#endif -#if GLOBAL_Q == 6 -#define _Qasin(A) _Q6asin(A) -#endif -#if GLOBAL_Q == 5 -#define _Qasin(A) _Q5asin(A) -#endif -#if GLOBAL_Q == 4 -#define _Qasin(A) _Q4asin(A) -#endif -#if GLOBAL_Q == 3 -#define _Qasin(A) _Q3asin(A) -#endif -#if GLOBAL_Q == 2 -#define _Qasin(A) _Q2asin(A) -#endif -#if GLOBAL_Q == 1 -#define _Qasin(A) _Q1asin(A) -#endif - -//***************************************************************************** -// -// Computes the cos of an Q number. -// -//***************************************************************************** -extern _q15 _Q15cos(_q15 A); -extern _q14 _Q14cos(_q14 A); -extern _q13 _Q13cos(_q13 A); -extern _q12 _Q12cos(_q12 A); -extern _q11 _Q11cos(_q11 A); -extern _q10 _Q10cos(_q10 A); -extern _q9 _Q9cos(_q9 A); -extern _q8 _Q8cos(_q8 A); -extern _q7 _Q7cos(_q7 A); -extern _q6 _Q6cos(_q6 A); -extern _q5 _Q5cos(_q5 A); -extern _q4 _Q4cos(_q4 A); -extern _q3 _Q3cos(_q3 A); -extern _q2 _Q2cos(_q2 A); -extern _q1 _Q1cos(_q1 A); - -#if GLOBAL_Q == 15 -#define _Qcos(A) _Q15cos(A) -#endif -#if GLOBAL_Q == 14 -#define _Qcos(A) _Q14cos(A) -#endif -#if GLOBAL_Q == 13 -#define _Qcos(A) _Q13cos(A) -#endif -#if GLOBAL_Q == 12 -#define _Qcos(A) _Q12cos(A) -#endif -#if GLOBAL_Q == 11 -#define _Qcos(A) _Q11cos(A) -#endif -#if GLOBAL_Q == 10 -#define _Qcos(A) _Q10cos(A) -#endif -#if GLOBAL_Q == 9 -#define _Qcos(A) _Q9cos(A) -#endif -#if GLOBAL_Q == 8 -#define _Qcos(A) _Q8cos(A) -#endif -#if GLOBAL_Q == 7 -#define _Qcos(A) _Q7cos(A) -#endif -#if GLOBAL_Q == 6 -#define _Qcos(A) _Q6cos(A) -#endif -#if GLOBAL_Q == 5 -#define _Qcos(A) _Q5cos(A) -#endif -#if GLOBAL_Q == 4 -#define _Qcos(A) _Q4cos(A) -#endif -#if GLOBAL_Q == 3 -#define _Qcos(A) _Q3cos(A) -#endif -#if GLOBAL_Q == 2 -#define _Qcos(A) _Q2cos(A) -#endif -#if GLOBAL_Q == 1 -#define _Qcos(A) _Q1cos(A) -#endif - -//***************************************************************************** -// -// Computes the cos of an Q number, using cycles per unit instead of radians. -// -//***************************************************************************** -extern _q15 _Q15cosPU(_q15 A); -extern _q14 _Q14cosPU(_q14 A); -extern _q13 _Q13cosPU(_q13 A); -extern _q12 _Q12cosPU(_q12 A); -extern _q11 _Q11cosPU(_q11 A); -extern _q10 _Q10cosPU(_q10 A); -extern _q9 _Q9cosPU(_q9 A); -extern _q8 _Q8cosPU(_q8 A); -extern _q7 _Q7cosPU(_q7 A); -extern _q6 _Q6cosPU(_q6 A); -extern _q5 _Q5cosPU(_q5 A); -extern _q4 _Q4cosPU(_q4 A); -extern _q3 _Q3cosPU(_q3 A); -extern _q2 _Q2cosPU(_q2 A); -extern _q1 _Q1cosPU(_q1 A); - -#if GLOBAL_Q == 15 -#define _QcosPU(A) _Q15cosPU(A) -#endif -#if GLOBAL_Q == 14 -#define _QcosPU(A) _Q14cosPU(A) -#endif -#if GLOBAL_Q == 13 -#define _QcosPU(A) _Q13cosPU(A) -#endif -#if GLOBAL_Q == 12 -#define _QcosPU(A) _Q12cosPU(A) -#endif -#if GLOBAL_Q == 11 -#define _QcosPU(A) _Q11cosPU(A) -#endif -#if GLOBAL_Q == 10 -#define _QcosPU(A) _Q10cosPU(A) -#endif -#if GLOBAL_Q == 9 -#define _QcosPU(A) _Q9cosPU(A) -#endif -#if GLOBAL_Q == 8 -#define _QcosPU(A) _Q8cosPU(A) -#endif -#if GLOBAL_Q == 7 -#define _QcosPU(A) _Q7cosPU(A) -#endif -#if GLOBAL_Q == 6 -#define _QcosPU(A) _Q6cosPU(A) -#endif -#if GLOBAL_Q == 5 -#define _QcosPU(A) _Q5cosPU(A) -#endif -#if GLOBAL_Q == 4 -#define _QcosPU(A) _Q4cosPU(A) -#endif -#if GLOBAL_Q == 3 -#define _QcosPU(A) _Q3cosPU(A) -#endif -#if GLOBAL_Q == 2 -#define _QcosPU(A) _Q2cosPU(A) -#endif -#if GLOBAL_Q == 1 -#define _QcosPU(A) _Q1cosPU(A) -#endif - -//***************************************************************************** -// -// Computes the arccos of an Q number. -// -//***************************************************************************** -#define _Q14acos(A) (_Q14(1.570796327) - _Q14asin(A)) -#define _Q13acos(A) (_Q13(1.570796327) - _Q13asin(A)) -#define _Q12acos(A) (_Q12(1.570796327) - _Q12asin(A)) -#define _Q11acos(A) (_Q11(1.570796327) - _Q11asin(A)) -#define _Q10acos(A) (_Q10(1.570796327) - _Q10asin(A)) -#define _Q9acos(A) (_Q9(1.570796327) - _Q9asin(A)) -#define _Q8acos(A) (_Q8(1.570796327) - _Q8asin(A)) -#define _Q7acos(A) (_Q7(1.570796327) - _Q7asin(A)) -#define _Q6acos(A) (_Q6(1.570796327) - _Q6asin(A)) -#define _Q5acos(A) (_Q5(1.570796327) - _Q5asin(A)) -#define _Q4acos(A) (_Q4(1.570796327) - _Q4asin(A)) -#define _Q3acos(A) (_Q3(1.570796327) - _Q3asin(A)) -#define _Q2acos(A) (_Q2(1.570796327) - _Q2asin(A)) -#define _Q1acos(A) (_Q1(1.570796327) - _Q1asin(A)) - -#if GLOBAL_Q == 14 -#define _Qacos(A) _Q14acos(A) -#endif -#if GLOBAL_Q == 13 -#define _Qacos(A) _Q13acos(A) -#endif -#if GLOBAL_Q == 12 -#define _Qacos(A) _Q12acos(A) -#endif -#if GLOBAL_Q == 11 -#define _Qacos(A) _Q11acos(A) -#endif -#if GLOBAL_Q == 10 -#define _Qacos(A) _Q10acos(A) -#endif -#if GLOBAL_Q == 9 -#define _Qacos(A) _Q9acos(A) -#endif -#if GLOBAL_Q == 8 -#define _Qacos(A) _Q8acos(A) -#endif -#if GLOBAL_Q == 7 -#define _Qacos(A) _Q7acos(A) -#endif -#if GLOBAL_Q == 6 -#define _Qacos(A) _Q6acos(A) -#endif -#if GLOBAL_Q == 5 -#define _Qacos(A) _Q5acos(A) -#endif -#if GLOBAL_Q == 4 -#define _Qacos(A) _Q4acos(A) -#endif -#if GLOBAL_Q == 3 -#define _Qacos(A) _Q3acos(A) -#endif -#if GLOBAL_Q == 2 -#define _Qacos(A) _Q2acos(A) -#endif -#if GLOBAL_Q == 1 -#define _Qacos(A) _Q1acos(A) -#endif - -//***************************************************************************** -// -// Computes the arctan of a coordinate specified by two Q numbers. -// -//***************************************************************************** -extern _q15 _Q15atan2(_q15 A, _q15 B); -extern _q14 _Q14atan2(_q14 A, _q14 B); -extern _q13 _Q13atan2(_q13 A, _q13 B); -extern _q12 _Q12atan2(_q12 A, _q12 B); -extern _q11 _Q11atan2(_q11 A, _q11 B); -extern _q10 _Q10atan2(_q10 A, _q10 B); -extern _q9 _Q9atan2(_q9 A, _q9 B); -extern _q8 _Q8atan2(_q8 A, _q8 B); -extern _q7 _Q7atan2(_q7 A, _q7 B); -extern _q6 _Q6atan2(_q6 A, _q6 B); -extern _q5 _Q5atan2(_q5 A, _q5 B); -extern _q4 _Q4atan2(_q4 A, _q4 B); -extern _q3 _Q3atan2(_q3 A, _q3 B); -extern _q2 _Q2atan2(_q2 A, _q2 B); -extern _q1 _Q1atan2(_q1 A, _q1 B); - -#if GLOBAL_Q == 15 -#define _Qatan2(A, B) _Q15atan2(A, B) -#endif -#if GLOBAL_Q == 14 -#define _Qatan2(A, B) _Q14atan2(A, B) -#endif -#if GLOBAL_Q == 13 -#define _Qatan2(A, B) _Q13atan2(A, B) -#endif -#if GLOBAL_Q == 12 -#define _Qatan2(A, B) _Q12atan2(A, B) -#endif -#if GLOBAL_Q == 11 -#define _Qatan2(A, B) _Q11atan2(A, B) -#endif -#if GLOBAL_Q == 10 -#define _Qatan2(A, B) _Q10atan2(A, B) -#endif -#if GLOBAL_Q == 9 -#define _Qatan2(A, B) _Q9atan2(A, B) -#endif -#if GLOBAL_Q == 8 -#define _Qatan2(A, B) _Q8atan2(A, B) -#endif -#if GLOBAL_Q == 7 -#define _Qatan2(A, B) _Q7atan2(A, B) -#endif -#if GLOBAL_Q == 6 -#define _Qatan2(A, B) _Q6atan2(A, B) -#endif -#if GLOBAL_Q == 5 -#define _Qatan2(A, B) _Q5atan2(A, B) -#endif -#if GLOBAL_Q == 4 -#define _Qatan2(A, B) _Q4atan2(A, B) -#endif -#if GLOBAL_Q == 3 -#define _Qatan2(A, B) _Q3atan2(A, B) -#endif -#if GLOBAL_Q == 2 -#define _Qatan2(A, B) _Q2atan2(A, B) -#endif -#if GLOBAL_Q == 1 -#define _Qatan2(A, B) _Q1atan2(A, B) -#endif - -//***************************************************************************** -// -// Computes the arctan of a coordinate specified by two Q numbers, returning -// the value in cycles per unit instead of radians. -// -//***************************************************************************** -extern _q15 _Q15atan2PU(_q15 A, _q15 B); -extern _q14 _Q14atan2PU(_q14 A, _q14 B); -extern _q13 _Q13atan2PU(_q13 A, _q13 B); -extern _q12 _Q12atan2PU(_q12 A, _q12 B); -extern _q11 _Q11atan2PU(_q11 A, _q11 B); -extern _q10 _Q10atan2PU(_q10 A, _q10 B); -extern _q9 _Q9atan2PU(_q9 A, _q9 B); -extern _q8 _Q8atan2PU(_q8 A, _q8 B); -extern _q7 _Q7atan2PU(_q7 A, _q7 B); -extern _q6 _Q6atan2PU(_q6 A, _q6 B); -extern _q5 _Q5atan2PU(_q5 A, _q5 B); -extern _q4 _Q4atan2PU(_q4 A, _q4 B); -extern _q3 _Q3atan2PU(_q3 A, _q3 B); -extern _q2 _Q2atan2PU(_q2 A, _q2 B); -extern _q1 _Q1atan2PU(_q1 A, _q1 B); - -#if GLOBAL_Q == 15 -#define _Qatan2PU(A, B) _Q15atan2PU(A, B) -#endif -#if GLOBAL_Q == 14 -#define _Qatan2PU(A, B) _Q14atan2PU(A, B) -#endif -#if GLOBAL_Q == 13 -#define _Qatan2PU(A, B) _Q13atan2PU(A, B) -#endif -#if GLOBAL_Q == 12 -#define _Qatan2PU(A, B) _Q12atan2PU(A, B) -#endif -#if GLOBAL_Q == 11 -#define _Qatan2PU(A, B) _Q11atan2PU(A, B) -#endif -#if GLOBAL_Q == 10 -#define _Qatan2PU(A, B) _Q10atan2PU(A, B) -#endif -#if GLOBAL_Q == 9 -#define _Qatan2PU(A, B) _Q9atan2PU(A, B) -#endif -#if GLOBAL_Q == 8 -#define _Qatan2PU(A, B) _Q8atan2PU(A, B) -#endif -#if GLOBAL_Q == 7 -#define _Qatan2PU(A, B) _Q7atan2PU(A, B) -#endif -#if GLOBAL_Q == 6 -#define _Qatan2PU(A, B) _Q6atan2PU(A, B) -#endif -#if GLOBAL_Q == 5 -#define _Qatan2PU(A, B) _Q5atan2PU(A, B) -#endif -#if GLOBAL_Q == 4 -#define _Qatan2PU(A, B) _Q4atan2PU(A, B) -#endif -#if GLOBAL_Q == 3 -#define _Qatan2PU(A, B) _Q3atan2PU(A, B) -#endif -#if GLOBAL_Q == 2 -#define _Qatan2PU(A, B) _Q2atan2PU(A, B) -#endif -#if GLOBAL_Q == 1 -#define _Qatan2PU(A, B) _Q1atan2PU(A, B) -#endif - -//***************************************************************************** -// -// Computes the arctan of an Q number. -// -//***************************************************************************** -#define _Q14atan(A) _Q14atan2(A, _Q14(1.0)) -#define _Q13atan(A) _Q13atan2(A, _Q13(1.0)) -#define _Q12atan(A) _Q12atan2(A, _Q12(1.0)) -#define _Q11atan(A) _Q11atan2(A, _Q11(1.0)) -#define _Q10atan(A) _Q10atan2(A, _Q10(1.0)) -#define _Q9atan(A) _Q9atan2(A, _Q9(1.0)) -#define _Q8atan(A) _Q8atan2(A, _Q8(1.0)) -#define _Q7atan(A) _Q7atan2(A, _Q7(1.0)) -#define _Q6atan(A) _Q6atan2(A, _Q6(1.0)) -#define _Q5atan(A) _Q5atan2(A, _Q5(1.0)) -#define _Q4atan(A) _Q4atan2(A, _Q4(1.0)) -#define _Q3atan(A) _Q3atan2(A, _Q3(1.0)) -#define _Q2atan(A) _Q2atan2(A, _Q2(1.0)) -#define _Q1atan(A) _Q1atan2(A, _Q1(1.0)) - -#if GLOBAL_Q == 15 -#define _Qatan(A) _Q15atan2(A, _Q15(1.0)) -#endif -#if GLOBAL_Q == 14 -#define _Qatan(A) _Q14atan2(A, _Q14(1.0)) -#endif -#if GLOBAL_Q == 13 -#define _Qatan(A) _Q13atan2(A, _Q13(1.0)) -#endif -#if GLOBAL_Q == 12 -#define _Qatan(A) _Q12atan2(A, _Q12(1.0)) -#endif -#if GLOBAL_Q == 11 -#define _Qatan(A) _Q11atan2(A, _Q11(1.0)) -#endif -#if GLOBAL_Q == 10 -#define _Qatan(A) _Q10atan2(A, _Q10(1.0)) -#endif -#if GLOBAL_Q == 9 -#define _Qatan(A) _Q9atan2(A, _Q9(1.0)) -#endif -#if GLOBAL_Q == 8 -#define _Qatan(A) _Q8atan2(A, _Q8(1.0)) -#endif -#if GLOBAL_Q == 7 -#define _Qatan(A) _Q7atan2(A, _Q7(1.0)) -#endif -#if GLOBAL_Q == 6 -#define _Qatan(A) _Q6atan2(A, _Q6(1.0)) -#endif -#if GLOBAL_Q == 5 -#define _Qatan(A) _Q5atan2(A, _Q5(1.0)) -#endif -#if GLOBAL_Q == 4 -#define _Qatan(A) _Q4atan2(A, _Q4(1.0)) -#endif -#if GLOBAL_Q == 3 -#define _Qatan(A) _Q3atan2(A, _Q3(1.0)) -#endif -#if GLOBAL_Q == 2 -#define _Qatan(A) _Q2atan2(A, _Q2(1.0)) -#endif -#if GLOBAL_Q == 1 -#define _Qatan(A) _Q1atan2(A, _Q1(1.0)) -#endif - -//***************************************************************************** -// -// Computes the square root of an Q number. -// -//***************************************************************************** -extern _q15 _Q15sqrt(_q15 A); -extern _q14 _Q14sqrt(_q14 A); -extern _q13 _Q13sqrt(_q13 A); -extern _q12 _Q12sqrt(_q12 A); -extern _q11 _Q11sqrt(_q11 A); -extern _q10 _Q10sqrt(_q10 A); -extern _q9 _Q9sqrt(_q9 A); -extern _q8 _Q8sqrt(_q8 A); -extern _q7 _Q7sqrt(_q7 A); -extern _q6 _Q6sqrt(_q6 A); -extern _q5 _Q5sqrt(_q5 A); -extern _q4 _Q4sqrt(_q4 A); -extern _q3 _Q3sqrt(_q3 A); -extern _q2 _Q2sqrt(_q2 A); -extern _q1 _Q1sqrt(_q1 A); - -#if GLOBAL_Q == 15 -#define _Qsqrt(A) _Q15sqrt(A) -#endif -#if GLOBAL_Q == 14 -#define _Qsqrt(A) _Q14sqrt(A) -#endif -#if GLOBAL_Q == 13 -#define _Qsqrt(A) _Q13sqrt(A) -#endif -#if GLOBAL_Q == 12 -#define _Qsqrt(A) _Q12sqrt(A) -#endif -#if GLOBAL_Q == 11 -#define _Qsqrt(A) _Q11sqrt(A) -#endif -#if GLOBAL_Q == 10 -#define _Qsqrt(A) _Q10sqrt(A) -#endif -#if GLOBAL_Q == 9 -#define _Qsqrt(A) _Q9sqrt(A) -#endif -#if GLOBAL_Q == 8 -#define _Qsqrt(A) _Q8sqrt(A) -#endif -#if GLOBAL_Q == 7 -#define _Qsqrt(A) _Q7sqrt(A) -#endif -#if GLOBAL_Q == 6 -#define _Qsqrt(A) _Q6sqrt(A) -#endif -#if GLOBAL_Q == 5 -#define _Qsqrt(A) _Q5sqrt(A) -#endif -#if GLOBAL_Q == 4 -#define _Qsqrt(A) _Q4sqrt(A) -#endif -#if GLOBAL_Q == 3 -#define _Qsqrt(A) _Q3sqrt(A) -#endif -#if GLOBAL_Q == 2 -#define _Qsqrt(A) _Q2sqrt(A) -#endif -#if GLOBAL_Q == 1 -#define _Qsqrt(A) _Q1sqrt(A) -#endif - -//***************************************************************************** -// -// Computes 1 over the square root of an Q number. -// -//***************************************************************************** -extern _q15 _Q15isqrt(_q15 A); -extern _q14 _Q14isqrt(_q14 A); -extern _q13 _Q13isqrt(_q13 A); -extern _q12 _Q12isqrt(_q12 A); -extern _q11 _Q11isqrt(_q11 A); -extern _q10 _Q10isqrt(_q10 A); -extern _q9 _Q9isqrt(_q9 A); -extern _q8 _Q8isqrt(_q8 A); -extern _q7 _Q7isqrt(_q7 A); -extern _q6 _Q6isqrt(_q6 A); -extern _q5 _Q5isqrt(_q5 A); -extern _q4 _Q4isqrt(_q4 A); -extern _q3 _Q3isqrt(_q3 A); -extern _q2 _Q2isqrt(_q2 A); -extern _q1 _Q1isqrt(_q1 A); - -#if GLOBAL_Q == 15 -#define _Qisqrt(A) _Q15isqrt(A) -#endif -#if GLOBAL_Q == 14 -#define _Qisqrt(A) _Q14isqrt(A) -#endif -#if GLOBAL_Q == 13 -#define _Qisqrt(A) _Q13isqrt(A) -#endif -#if GLOBAL_Q == 12 -#define _Qisqrt(A) _Q12isqrt(A) -#endif -#if GLOBAL_Q == 11 -#define _Qisqrt(A) _Q11isqrt(A) -#endif -#if GLOBAL_Q == 10 -#define _Qisqrt(A) _Q10isqrt(A) -#endif -#if GLOBAL_Q == 9 -#define _Qisqrt(A) _Q9isqrt(A) -#endif -#if GLOBAL_Q == 8 -#define _Qisqrt(A) _Q8isqrt(A) -#endif -#if GLOBAL_Q == 7 -#define _Qisqrt(A) _Q7isqrt(A) -#endif -#if GLOBAL_Q == 6 -#define _Qisqrt(A) _Q6isqrt(A) -#endif -#if GLOBAL_Q == 5 -#define _Qisqrt(A) _Q5isqrt(A) -#endif -#if GLOBAL_Q == 4 -#define _Qisqrt(A) _Q4isqrt(A) -#endif -#if GLOBAL_Q == 3 -#define _Qisqrt(A) _Q3isqrt(A) -#endif -#if GLOBAL_Q == 2 -#define _Qisqrt(A) _Q2isqrt(A) -#endif -#if GLOBAL_Q == 1 -#define _Qisqrt(A) _Q1isqrt(A) -#endif - -//***************************************************************************** -// -// Computes e^x of an Q number. -// -//***************************************************************************** -extern _q15 _Q15exp(_q15 A); -extern _q14 _Q14exp(_q14 A); -extern _q13 _Q13exp(_q13 A); -extern _q12 _Q12exp(_q12 A); -extern _q11 _Q11exp(_q11 A); -extern _q10 _Q10exp(_q10 A); -extern _q9 _Q9exp(_q9 A); -extern _q8 _Q8exp(_q8 A); -extern _q7 _Q7exp(_q7 A); -extern _q6 _Q6exp(_q6 A); -extern _q5 _Q5exp(_q5 A); -extern _q4 _Q4exp(_q4 A); -extern _q3 _Q3exp(_q3 A); -extern _q2 _Q2exp(_q2 A); -extern _q1 _Q1exp(_q1 A); - -#if GLOBAL_Q == 15 -#define _Qexp(A) _Q15exp(A) -#endif -#if GLOBAL_Q == 14 -#define _Qexp(A) _Q14exp(A) -#endif -#if GLOBAL_Q == 13 -#define _Qexp(A) _Q13exp(A) -#endif -#if GLOBAL_Q == 12 -#define _Qexp(A) _Q12exp(A) -#endif -#if GLOBAL_Q == 11 -#define _Qexp(A) _Q11exp(A) -#endif -#if GLOBAL_Q == 10 -#define _Qexp(A) _Q10exp(A) -#endif -#if GLOBAL_Q == 9 -#define _Qexp(A) _Q9exp(A) -#endif -#if GLOBAL_Q == 8 -#define _Qexp(A) _Q8exp(A) -#endif -#if GLOBAL_Q == 7 -#define _Qexp(A) _Q7exp(A) -#endif -#if GLOBAL_Q == 6 -#define _Qexp(A) _Q6exp(A) -#endif -#if GLOBAL_Q == 5 -#define _Qexp(A) _Q5exp(A) -#endif -#if GLOBAL_Q == 4 -#define _Qexp(A) _Q4exp(A) -#endif -#if GLOBAL_Q == 3 -#define _Qexp(A) _Q3exp(A) -#endif -#if GLOBAL_Q == 2 -#define _Qexp(A) _Q2exp(A) -#endif -#if GLOBAL_Q == 1 -#define _Qexp(A) _Q1exp(A) -#endif - -//***************************************************************************** -// -// Computes log(x) of an Q number. -// -//***************************************************************************** -extern _q15 _Q15log(_q15 A); -extern _q14 _Q14log(_q14 A); -extern _q13 _Q13log(_q13 A); -extern _q12 _Q12log(_q12 A); -extern _q11 _Q11log(_q11 A); -extern _q10 _Q10log(_q10 A); -extern _q9 _Q9log(_q9 A); -extern _q8 _Q8log(_q8 A); -extern _q7 _Q7log(_q7 A); -extern _q6 _Q6log(_q6 A); -extern _q5 _Q5log(_q5 A); -extern _q4 _Q4log(_q4 A); -extern _q3 _Q3log(_q3 A); -extern _q2 _Q2log(_q2 A); -extern _q1 _Q1log(_q1 A); - -#if GLOBAL_Q == 15 -#define _Qlog(A) _Q15log(A) -#endif -#if GLOBAL_Q == 14 -#define _Qlog(A) _Q14log(A) -#endif -#if GLOBAL_Q == 13 -#define _Qlog(A) _Q13log(A) -#endif -#if GLOBAL_Q == 12 -#define _Qlog(A) _Q12log(A) -#endif -#if GLOBAL_Q == 11 -#define _Qlog(A) _Q11log(A) -#endif -#if GLOBAL_Q == 10 -#define _Qlog(A) _Q10log(A) -#endif -#if GLOBAL_Q == 9 -#define _Qlog(A) _Q9log(A) -#endif -#if GLOBAL_Q == 8 -#define _Qlog(A) _Q8log(A) -#endif -#if GLOBAL_Q == 7 -#define _Qlog(A) _Q7log(A) -#endif -#if GLOBAL_Q == 6 -#define _Qlog(A) _Q6log(A) -#endif -#if GLOBAL_Q == 5 -#define _Qlog(A) _Q5log(A) -#endif -#if GLOBAL_Q == 4 -#define _Qlog(A) _Q4log(A) -#endif -#if GLOBAL_Q == 3 -#define _Qlog(A) _Q3log(A) -#endif -#if GLOBAL_Q == 2 -#define _Qlog(A) _Q2log(A) -#endif -#if GLOBAL_Q == 1 -#define _Qlog(A) _Q1log(A) -#endif - -//***************************************************************************** -// -// Returns the integer portion of an Q number. -// -//***************************************************************************** -#define _Q15int(A) ((A) >> 15) -#define _Q14int(A) ((A) >> 14) -#define _Q13int(A) ((A) >> 13) -#define _Q12int(A) ((A) >> 12) -#define _Q11int(A) ((A) >> 11) -#define _Q10int(A) ((A) >> 10) -#define _Q9int(A) ((A) >> 9) -#define _Q8int(A) ((A) >> 8) -#define _Q7int(A) ((A) >> 7) -#define _Q6int(A) ((A) >> 6) -#define _Q5int(A) ((A) >> 5) -#define _Q4int(A) ((A) >> 4) -#define _Q3int(A) ((A) >> 3) -#define _Q2int(A) ((A) >> 2) -#define _Q1int(A) ((A) >> 1) -#define _Qint(A) ((A) >> GLOBAL_Q) - -//***************************************************************************** -// -// Computes the fractional portion of an Q number. -// -//***************************************************************************** -extern _q15 _Q15frac(_q15 A); -extern _q14 _Q14frac(_q14 A); -extern _q13 _Q13frac(_q13 A); -extern _q12 _Q12frac(_q12 A); -extern _q11 _Q11frac(_q11 A); -extern _q10 _Q10frac(_q10 A); -extern _q9 _Q9frac(_q9 A); -extern _q8 _Q8frac(_q8 A); -extern _q7 _Q7frac(_q7 A); -extern _q6 _Q6frac(_q6 A); -extern _q5 _Q5frac(_q5 A); -extern _q4 _Q4frac(_q4 A); -extern _q3 _Q3frac(_q3 A); -extern _q2 _Q2frac(_q2 A); -extern _q1 _Q1frac(_q1 A); - -#if GLOBAL_Q == 15 -#define _Qfrac(A) _Q15frac(A) -#endif -#if GLOBAL_Q == 14 -#define _Qfrac(A) _Q14frac(A) -#endif -#if GLOBAL_Q == 13 -#define _Qfrac(A) _Q13frac(A) -#endif -#if GLOBAL_Q == 12 -#define _Qfrac(A) _Q12frac(A) -#endif -#if GLOBAL_Q == 11 -#define _Qfrac(A) _Q11frac(A) -#endif -#if GLOBAL_Q == 10 -#define _Qfrac(A) _Q10frac(A) -#endif -#if GLOBAL_Q == 9 -#define _Qfrac(A) _Q9frac(A) -#endif -#if GLOBAL_Q == 8 -#define _Qfrac(A) _Q8frac(A) -#endif -#if GLOBAL_Q == 7 -#define _Qfrac(A) _Q7frac(A) -#endif -#if GLOBAL_Q == 6 -#define _Qfrac(A) _Q6frac(A) -#endif -#if GLOBAL_Q == 5 -#define _Qfrac(A) _Q5frac(A) -#endif -#if GLOBAL_Q == 4 -#define _Qfrac(A) _Q4frac(A) -#endif -#if GLOBAL_Q == 3 -#define _Qfrac(A) _Q3frac(A) -#endif -#if GLOBAL_Q == 2 -#define _Qfrac(A) _Q2frac(A) -#endif -#if GLOBAL_Q == 1 -#define _Qfrac(A) _Q1frac(A) -#endif - -//***************************************************************************** -// -// Multiplies two Q numbers in the specified iQ formats, returning the result -// in another Q format. -// -//***************************************************************************** -extern int16_t _Q15mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q14mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q13mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q12mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q11mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q10mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q9mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q8mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q7mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q6mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q5mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q4mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q3mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q2mpyQX(int16_t A, int n1, int16_t B, int n2); -extern int16_t _Q1mpyQX(int16_t A, int n1, int16_t B, int n2); - -#if GLOBAL_Q == 15 -#define _QmpyQX(A, n1, B, n2) _Q15mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 14 -#define _QmpyQX(A, n1, B, n2) _Q14mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 13 -#define _QmpyQX(A, n1, B, n2) _Q13mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 12 -#define _QmpyQX(A, n1, B, n2) _Q12mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 11 -#define _QmpyQX(A, n1, B, n2) _Q11mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 10 -#define _QmpyQX(A, n1, B, n2) _Q10mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 9 -#define _QmpyQX(A, n1, B, n2) _Q9mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 8 -#define _QmpyQX(A, n1, B, n2) _Q8mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 7 -#define _QmpyQX(A, n1, B, n2) _Q7mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 6 -#define _QmpyQX(A, n1, B, n2) _Q6mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 5 -#define _QmpyQX(A, n1, B, n2) _Q5mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 4 -#define _QmpyQX(A, n1, B, n2) _Q4mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 3 -#define _QmpyQX(A, n1, B, n2) _Q3mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 2 -#define _QmpyQX(A, n1, B, n2) _Q2mpyQX(A, n1, B, n2) -#endif -#if GLOBAL_Q == 1 -#define _QmpyQX(A, n1, B, n2) _Q1mpyQX(A, n1, B, n2) -#endif - - -//***************************************************************************** -// -// Multiplies a Q number by an integer. -// -//***************************************************************************** -#define _Q15mpyI16(A, B) ((A) * (B)) -#define _Q14mpyI16(A, B) ((A) * (B)) -#define _Q13mpyI16(A, B) ((A) * (B)) -#define _Q12mpyI16(A, B) ((A) * (B)) -#define _Q11mpyI16(A, B) ((A) * (B)) -#define _Q10mpyI16(A, B) ((A) * (B)) -#define _Q9mpyI16(A, B) ((A) * (B)) -#define _Q8mpyI16(A, B) ((A) * (B)) -#define _Q7mpyI16(A, B) ((A) * (B)) -#define _Q6mpyI16(A, B) ((A) * (B)) -#define _Q5mpyI16(A, B) ((A) * (B)) -#define _Q4mpyI16(A, B) ((A) * (B)) -#define _Q3mpyI16(A, B) ((A) * (B)) -#define _Q2mpyI16(A, B) ((A) * (B)) -#define _Q1mpyI16(A, B) ((A) * (B)) -#define _QmpyI16(A, B) ((A) * (B)) - -//***************************************************************************** -// -// Multiplies a Q number by an integer, and returns the integer portion. -// -//***************************************************************************** -#define _Q15mpyI16int(A, B) _Q15int(_Q15mpyI16(A, B)) -#define _Q14mpyI16int(A, B) _Q14int(_Q14mpyI16(A, B)) -#define _Q13mpyI16int(A, B) _Q13int(_Q13mpyI16(A, B)) -#define _Q12mpyI16int(A, B) _Q12int(_Q12mpyI16(A, B)) -#define _Q11mpyI16int(A, B) _Q11int(_Q11mpyI16(A, B)) -#define _Q10mpyI16int(A, B) _Q10int(_Q10mpyI16(A, B)) -#define _Q9mpyI16int(A, B) _Q9int(_Q9mpyI16(A, B)) -#define _Q8mpyI16int(A, B) _Q8int(_Q8mpyI16(A, B)) -#define _Q7mpyI16int(A, B) _Q7int(_Q7mpyI16(A, B)) -#define _Q6mpyI16int(A, B) _Q6int(_Q6mpyI16(A, B)) -#define _Q5mpyI16int(A, B) _Q5int(_Q5mpyI16(A, B)) -#define _Q4mpyI16int(A, B) _Q4int(_Q4mpyI16(A, B)) -#define _Q3mpyI16int(A, B) _Q3int(_Q3mpyI16(A, B)) -#define _Q2mpyI16int(A, B) _Q2int(_Q2mpyI16(A, B)) -#define _Q1mpyI16int(A, B) _Q1int(_Q1mpyI16(A, B)) - -#if GLOBAL_Q == 15 -#define _QmpyI16int(A, B) _Q15mpyI16int(A, B) -#endif -#if GLOBAL_Q == 14 -#define _QmpyI16int(A, B) _Q14mpyI16int(A, B) -#endif -#if GLOBAL_Q == 13 -#define _QmpyI16int(A, B) _Q13mpyI16int(A, B) -#endif -#if GLOBAL_Q == 12 -#define _QmpyI16int(A, B) _Q12mpyI16int(A, B) -#endif -#if GLOBAL_Q == 11 -#define _QmpyI16int(A, B) _Q11mpyI16int(A, B) -#endif -#if GLOBAL_Q == 10 -#define _QmpyI16int(A, B) _Q10mpyI16int(A, B) -#endif -#if GLOBAL_Q == 9 -#define _QmpyI16int(A, B) _Q9mpyI16int(A, B) -#endif -#if GLOBAL_Q == 8 -#define _QmpyI16int(A, B) _Q8mpyI16int(A, B) -#endif -#if GLOBAL_Q == 7 -#define _QmpyI16int(A, B) _Q7mpyI16int(A, B) -#endif -#if GLOBAL_Q == 6 -#define _QmpyI16int(A, B) _Q6mpyI16int(A, B) -#endif -#if GLOBAL_Q == 5 -#define _QmpyI16int(A, B) _Q5mpyI16int(A, B) -#endif -#if GLOBAL_Q == 4 -#define _QmpyI16int(A, B) _Q4mpyI16int(A, B) -#endif -#if GLOBAL_Q == 3 -#define _QmpyI16int(A, B) _Q3mpyI16int(A, B) -#endif -#if GLOBAL_Q == 2 -#define _QmpyI16int(A, B) _Q2mpyI16int(A, B) -#endif -#if GLOBAL_Q == 1 -#define _QmpyI16int(A, B) _Q1mpyI16int(A, B) -#endif - -//***************************************************************************** -// -// Multiplies a Q number by an integer, and returns the fractional portion. -// -//***************************************************************************** -#define _Q15mpyI16frac(A, B) _Q15frac(_Q15mpyI16(A, B)) -#define _Q14mpyI16frac(A, B) _Q14frac(_Q14mpyI16(A, B)) -#define _Q13mpyI16frac(A, B) _Q13frac(_Q13mpyI16(A, B)) -#define _Q12mpyI16frac(A, B) _Q12frac(_Q12mpyI16(A, B)) -#define _Q11mpyI16frac(A, B) _Q11frac(_Q11mpyI16(A, B)) -#define _Q10mpyI16frac(A, B) _Q10frac(_Q10mpyI16(A, B)) -#define _Q9mpyI16frac(A, B) _Q9frac(_Q9mpyI16(A, B)) -#define _Q8mpyI16frac(A, B) _Q8frac(_Q8mpyI16(A, B)) -#define _Q7mpyI16frac(A, B) _Q7frac(_Q7mpyI16(A, B)) -#define _Q6mpyI16frac(A, B) _Q6frac(_Q6mpyI16(A, B)) -#define _Q5mpyI16frac(A, B) _Q5frac(_Q5mpyI16(A, B)) -#define _Q4mpyI16frac(A, B) _Q4frac(_Q4mpyI16(A, B)) -#define _Q3mpyI16frac(A, B) _Q3frac(_Q3mpyI16(A, B)) -#define _Q2mpyI16frac(A, B) _Q2frac(_Q2mpyI16(A, B)) -#define _Q1mpyI16frac(A, B) _Q1frac(_Q1mpyI16(A, B)) - -#if GLOBAL_Q == 15 -#define _QmpyI16frac(A, B) _Q15mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 14 -#define _QmpyI16frac(A, B) _Q14mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 13 -#define _QmpyI16frac(A, B) _Q13mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 12 -#define _QmpyI16frac(A, B) _Q12mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 11 -#define _QmpyI16frac(A, B) _Q11mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 10 -#define _QmpyI16frac(A, B) _Q10mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 9 -#define _QmpyI16frac(A, B) _Q9mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 8 -#define _QmpyI16frac(A, B) _Q8mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 7 -#define _QmpyI16frac(A, B) _Q7mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 6 -#define _QmpyI16frac(A, B) _Q6mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 5 -#define _QmpyI16frac(A, B) _Q5mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 4 -#define _QmpyI16frac(A, B) _Q4mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 3 -#define _QmpyI16frac(A, B) _Q3mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 2 -#define _QmpyI16frac(A, B) _Q2mpyI16frac(A, B) -#endif -#if GLOBAL_Q == 1 -#define _QmpyI16frac(A, B) _Q1mpyI16frac(A, B) -#endif - -//***************************************************************************** -// -// Computes the square root of A^2 + B^2 using Q numbers. -// -//***************************************************************************** -extern int16_t _Qmag(int16_t A, int16_t B); -#define _Q15mag(A, B) _Qmag(A, B) -#define _Q14mag(A, B) _Qmag(A, B) -#define _Q13mag(A, B) _Qmag(A, B) -#define _Q12mag(A, B) _Qmag(A, B) -#define _Q11mag(A, B) _Qmag(A, B) -#define _Q10mag(A, B) _Qmag(A, B) -#define _Q9mag(A, B) _Qmag(A, B) -#define _Q8mag(A, B) _Qmag(A, B) -#define _Q7mag(A, B) _Qmag(A, B) -#define _Q6mag(A, B) _Qmag(A, B) -#define _Q5mag(A, B) _Qmag(A, B) -#define _Q4mag(A, B) _Qmag(A, B) -#define _Q3mag(A, B) _Qmag(A, B) -#define _Q2mag(A, B) _Qmag(A, B) -#define _Q1mag(A, B) _Qmag(A, B) - -//***************************************************************************** -// -// Computes the inverse square root of A^2 + B^2 using Q numbers. -// -//***************************************************************************** -extern _q15 _Q15imag(_q15 A, _q15 B); -extern _q14 _Q14imag(_q14 A, _q14 B); -extern _q13 _Q13imag(_q13 A, _q13 B); -extern _q12 _Q12imag(_q12 A, _q12 B); -extern _q11 _Q11imag(_q11 A, _q11 B); -extern _q10 _Q10imag(_q10 A, _q10 B); -extern _q9 _Q9imag(_q9 A, _q9 B); -extern _q8 _Q8imag(_q8 A, _q8 B); -extern _q7 _Q7imag(_q7 A, _q7 B); -extern _q6 _Q6imag(_q6 A, _q6 B); -extern _q5 _Q5imag(_q5 A, _q5 B); -extern _q4 _Q4imag(_q4 A, _q4 B); -extern _q3 _Q3imag(_q3 A, _q3 B); -extern _q2 _Q2imag(_q2 A, _q2 B); -extern _q1 _Q1imag(_q1 A, _q1 B); - -#if GLOBAL_Q == 15 -#define _Qimag(A, B) _Q15imag(A, B) -#endif -#if GLOBAL_Q == 14 -#define _Qimag(A, B) _Q14imag(A, B) -#endif -#if GLOBAL_Q == 13 -#define _Qimag(A, B) _Q13imag(A, B) -#endif -#if GLOBAL_Q == 12 -#define _Qimag(A, B) _Q12imag(A, B) -#endif -#if GLOBAL_Q == 11 -#define _Qimag(A, B) _Q11imag(A, B) -#endif -#if GLOBAL_Q == 10 -#define _Qimag(A, B) _Q10imag(A, B) -#endif -#if GLOBAL_Q == 9 -#define _Qimag(A, B) _Q9imag(A, B) -#endif -#if GLOBAL_Q == 8 -#define _Qimag(A, B) _Q8imag(A, B) -#endif -#if GLOBAL_Q == 7 -#define _Qimag(A, B) _Q7imag(A, B) -#endif -#if GLOBAL_Q == 6 -#define _Qimag(A, B) _Q6imag(A, B) -#endif -#if GLOBAL_Q == 5 -#define _Qimag(A, B) _Q5imag(A, B) -#endif -#if GLOBAL_Q == 4 -#define _Qimag(A, B) _Q4imag(A, B) -#endif -#if GLOBAL_Q == 3 -#define _Qimag(A, B) _Q3imag(A, B) -#endif -#if GLOBAL_Q == 2 -#define _Qimag(A, B) _Q2imag(A, B) -#endif -#if GLOBAL_Q == 1 -#define _Qimag(A, B) _Q1imag(A, B) -#endif - -//***************************************************************************** -// -// Converts a string into an Q number. -// -//***************************************************************************** -extern _q15 _atoQ15(const char *A); -extern _q14 _atoQ14(const char *A); -extern _q13 _atoQ13(const char *A); -extern _q12 _atoQ12(const char *A); -extern _q11 _atoQ11(const char *A); -extern _q10 _atoQ10(const char *A); -extern _q9 _atoQ9(const char *A); -extern _q8 _atoQ8(const char *A); -extern _q7 _atoQ7(const char *A); -extern _q6 _atoQ6(const char *A); -extern _q5 _atoQ5(const char *A); -extern _q4 _atoQ4(const char *A); -extern _q3 _atoQ3(const char *A); -extern _q2 _atoQ2(const char *A); -extern _q1 _atoQ1(const char *A); - -#if GLOBAL_Q == 15 -#define _atoQ(A) _atoQ15(A) -#endif -#if GLOBAL_Q == 14 -#define _atoQ(A) _atoQ14(A) -#endif -#if GLOBAL_Q == 13 -#define _atoQ(A) _atoQ13(A) -#endif -#if GLOBAL_Q == 12 -#define _atoQ(A) _atoQ12(A) -#endif -#if GLOBAL_Q == 11 -#define _atoQ(A) _atoQ11(A) -#endif -#if GLOBAL_Q == 10 -#define _atoQ(A) _atoQ10(A) -#endif -#if GLOBAL_Q == 9 -#define _atoQ(A) _atoQ9(A) -#endif -#if GLOBAL_Q == 8 -#define _atoQ(A) _atoQ8(A) -#endif -#if GLOBAL_Q == 7 -#define _atoQ(A) _atoQ7(A) -#endif -#if GLOBAL_Q == 6 -#define _atoQ(A) _atoQ6(A) -#endif -#if GLOBAL_Q == 5 -#define _atoQ(A) _atoQ5(A) -#endif -#if GLOBAL_Q == 4 -#define _atoQ(A) _atoQ4(A) -#endif -#if GLOBAL_Q == 3 -#define _atoQ(A) _atoQ3(A) -#endif -#if GLOBAL_Q == 2 -#define _atoQ(A) _atoQ2(A) -#endif -#if GLOBAL_Q == 1 -#define _atoQ(A) _atoQ1(A) -#endif - -//***************************************************************************** -// -// Converts an Q number into a string. -// -//***************************************************************************** -extern int16_t _Q15toa(char *string, const char *format, _q15 input); -extern int16_t _Q14toa(char *string, const char *format, _q14 input); -extern int16_t _Q13toa(char *string, const char *format, _q13 input); -extern int16_t _Q12toa(char *string, const char *format, _q12 input); -extern int16_t _Q11toa(char *string, const char *format, _q11 input); -extern int16_t _Q10toa(char *string, const char *format, _q10 input); -extern int16_t _Q9toa(char *string, const char *format, _q9 input); -extern int16_t _Q8toa(char *string, const char *format, _q8 input); -extern int16_t _Q7toa(char *string, const char *format, _q7 input); -extern int16_t _Q6toa(char *string, const char *format, _q6 input); -extern int16_t _Q5toa(char *string, const char *format, _q5 input); -extern int16_t _Q4toa(char *string, const char *format, _q4 input); -extern int16_t _Q3toa(char *string, const char *format, _q3 input); -extern int16_t _Q2toa(char *string, const char *format, _q2 input); -extern int16_t _Q1toa(char *string, const char *format, _q1 input); - -#if GLOBAL_Q == 15 -#define _Qtoa(A, B, C) _Q15toa(A, B, C) -#endif -#if GLOBAL_Q == 14 -#define _Qtoa(A, B, C) _Q14toa(A, B, C) -#endif -#if GLOBAL_Q == 13 -#define _Qtoa(A, B, C) _Q13toa(A, B, C) -#endif -#if GLOBAL_Q == 12 -#define _Qtoa(A, B, C) _Q12toa(A, B, C) -#endif -#if GLOBAL_Q == 11 -#define _Qtoa(A, B, C) _Q11toa(A, B, C) -#endif -#if GLOBAL_Q == 10 -#define _Qtoa(A, B, C) _Q10toa(A, B, C) -#endif -#if GLOBAL_Q == 9 -#define _Qtoa(A, B, C) _Q9toa(A, B, C) -#endif -#if GLOBAL_Q == 8 -#define _Qtoa(A, B, C) _Q8toa(A, B, C) -#endif -#if GLOBAL_Q == 7 -#define _Qtoa(A, B, C) _Q7toa(A, B, C) -#endif -#if GLOBAL_Q == 6 -#define _Qtoa(A, B, C) _Q6toa(A, B, C) -#endif -#if GLOBAL_Q == 5 -#define _Qtoa(A, B, C) _Q5toa(A, B, C) -#endif -#if GLOBAL_Q == 4 -#define _Qtoa(A, B, C) _Q4toa(A, B, C) -#endif -#if GLOBAL_Q == 3 -#define _Qtoa(A, B, C) _Q3toa(A, B, C) -#endif -#if GLOBAL_Q == 2 -#define _Qtoa(A, B, C) _Q2toa(A, B, C) -#endif -#if GLOBAL_Q == 1 -#define _Qtoa(A, B, C) _Q1toa(A, B, C) -#endif - -//***************************************************************************** -// -// Computes the absolute value of an Q number. -// -//***************************************************************************** -#define _Q15abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q14abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q13abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q12abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q11abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q10abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q9abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q8abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q7abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q6abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q5abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q4abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q3abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q2abs(A) (((A) < 0) ? - (A) : (A)) -#define _Q1abs(A) (((A) < 0) ? - (A) : (A)) -#define _Qabs(A) (((A) < 0) ? - (A) : (A)) - -//***************************************************************************** -// -// Mark the end of the C bindings section for C++ compilers. -// -//***************************************************************************** -#ifdef __cplusplus -} -#endif - -#endif // __QMATHLIB_H__ diff --git a/README.html b/README.html deleted file mode 100755 index bc4e49c..0000000 --- a/README.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - -
-
- -
- -
-
-

-

Table of Contents

- -
-

gc_simple_json

-
-

Example Summary

-

This example demonstrates basic usage of how to send data using JSON formatted strings. In addition, it showcases how to connect target objects with GUI widgets. For details about the architecture of the example or about implementation, please view the User’s Guide.

-

Example Usage

-
    -
  • Please read the Quick Start Guide on how to flash your LaunchPad with the code example, and how to import the provided GUI zip into GUI Composer.

  • -
  • This example uses the MSP430_SimpleGUI_JSON.zip GUI. This can be found: -
  • -
  • Run the example and the GUI.

  • -
-

The demo should start running with the following functionality:

-
    -
  • “Counters” plot shows an 8-bit, 16-bits and 32-bits counters

    - -
      -
    • The 8-bit counter corresponds to variable u8Counter and it’s bound to JSON token “c1”. It increments by 50 when switch S1 is pressed.
    • -
    • The 16-bit counter corresponds to variable u16Counter and it’s bound to JSON token “c2”. It increments by 5,000 when switch S2 is pressed.
    • -
    • The 32-bit counter corresponds to variable u32Counter and it’s bound to JSON token “c3”. It increments by 10,000 periodically on TB0 interrupt
    • -
  • -
  • The gauge shows a floating point number, which in this case is sent as fractional (QMath/IQMath)

    - -
      -
    • The counter corresponds to variable qCounter and it’s bound to JSON token “c4”. It increments by qIncrement on TB0 interrupt and only when bEnableSwitch==true.
    • -
  • -
  • The increment for the gauge is set by the horizontal slider

    - -
      -
    • The increments corresponds to variable qIncrement and it’s bound to JSON token “u16Data”. The value is sent by the GUI to the device when the slider changes.
    • -
  • -
  • The “Enable Float” switch enables incrementing the gauge increments

    - -
      -
    • The switch corresponds to variable bEnableSwitch and it’s bound to JSON token “bEnable”. The switch is sent by the GUI to the device when the value changes.
    • -
  • -
-

Notes:

-
    -
  • This example does not implement push-button debounce, so you might see multiple increments when pressing the button.
  • -
  • The increments (50, 5000, 10000) are only meant to show the difference between variable type sizes.
  • -
  • The example is sending ALL variables every time it wakes up due to button press or timer interrupt.
  • -
  • It’s recommended to keep the JSON tokens short, especially when sending them often. Longer tokens will result in longer transmission times.
  • -
-

Additional Information

-

For more information on modifying the GUI and serial communication, please view the GUI Composer User’s Guide.

- -
- - - diff --git a/constants.h b/constants.h new file mode 100644 index 0000000..94dc64a --- /dev/null +++ b/constants.h @@ -0,0 +1,6 @@ +/** + * @file constants.h + * @brief Reused constants not included in the std-Headers. + */ + +#define NULL 0 diff --git a/doxygen.conf b/doxygen.conf new file mode 100644 index 0000000..069d4e3 --- /dev/null +++ b/doxygen.conf @@ -0,0 +1,2930 @@ +# Doxyfile 1.13.2 + +# This file describes the settings to be used by the documentation system +# Doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). +# +# Note: +# +# Use Doxygen to compare the used configuration file with the template +# configuration file: +# doxygen -x [configFile] +# Use Doxygen to compare the used configuration file with the template +# configuration file without replacing the environment variables or CMake type +# replacement variables: +# doxygen -x_noenv [configFile] + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "My Project" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewers a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# With the PROJECT_ICON tag one can specify an icon that is included in the tabs +# when the HTML document is shown. Doxygen will copy the logo to the output +# directory. + +PROJECT_ICON = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where Doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES then Doxygen will create up to 4096 +# sub-directories (in 2 levels) under the output directory of each output format +# and will distribute the generated files over these directories. Enabling this +# option can be useful when feeding Doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise cause +# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to +# control the number of sub-directories. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# Controls the number of sub-directories that will be created when +# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every +# level increment doubles the number of directories, resulting in 4096 +# directories at level 8 which is the default and also the maximum value. The +# sub-directories are organized in 2 levels, the first level always has a fixed +# number of 16 directories. +# Minimum value: 0, maximum value: 8, default value: 8. +# This tag requires that the tag CREATE_SUBDIRS is set to YES. + +CREATE_SUBDIRS_LEVEL = 8 + +# If the ALLOW_UNICODE_NAMES tag is set to YES, Doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by Doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, +# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English +# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, +# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with +# English messages), Korean, Korean-en (Korean with English messages), Latvian, +# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, +# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, +# Swedish, Turkish, Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, Doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, Doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, Doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, Doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which Doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where Doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, Doxygen will generate much shorter (but +# less readable) file names. This can be useful if your file system doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen will interpret the +# first line (until the first dot, question mark or exclamation mark) of a +# Javadoc-style comment as the brief description. If set to NO, the Javadoc- +# style will behave just like regular Qt-style comments (thus requiring an +# explicit @brief command for a brief description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the JAVADOC_BANNER tag is set to YES then Doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by Doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will interpret the first +# line (until the first dot, question mark or exclamation mark) of a Qt-style +# comment as the brief description. If set to NO, the Qt-style will behave just +# like regular Qt-style comments (thus requiring an explicit \brief command for +# a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# By default Python docstrings are displayed as preformatted text and Doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# Doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as Doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then Doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:^^" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". Note that you cannot put \n's in the value part of an alias +# to insert newlines (in the resulting output). You can put ^^ in the value part +# of an alias to insert a newline as if a physical newline was in the original +# file. When you need a literal { or } or , in the value part of an alias you +# have to escape them by means of a backslash (\), this can lead to conflicts +# with the commands \{ and \} for these it is advised to use the version @{ and +# @} or use a double escape (\\{ and \\}) + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by Doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, +# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files). For instance to make Doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by Doxygen. When specifying no_extension you should add +# * to the FILE_PATTERNS. +# +# Note see also the list of default file extension mappings. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then Doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by Doxygen, so you can +# mix Doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 6. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 6 + +# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to +# generate identifiers for the Markdown headings. Note: Every identifier is +# unique. +# Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a +# sequence number starting at 0 and GITHUB use the lower case version of title +# with any whitespace replaced by '-' and punctuation characters removed. +# The default value is: DOXYGEN. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +MARKDOWN_ID_STYLE = DOXYGEN + +# When enabled Doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. Words listed in the +# AUTOLINK_IGNORE_WORDS tag are excluded from automatic linking. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# This tag specifies a list of words that, when matching the start of a word in +# the documentation, will suppress auto links generation, if it is enabled via +# AUTOLINK_SUPPORT. This list does not affect affect links explicitly created +# using \# or the \link or commands. +# This tag requires that the tag AUTOLINK_SUPPORT is set to YES. + +AUTOLINK_IGNORE_WORDS = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let Doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also makes the inheritance and +# collaboration diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software) sources only. Doxygen will parse +# them like normal C++ but will assume all classes use public instead of private +# inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# Doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then Doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, Doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# Doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run Doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +# The NUM_PROC_THREADS specifies the number of threads Doxygen is allowed to use +# during processing. When set to 0 Doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which effectively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + +# If the TIMESTAMP tag is set different from NO then each generated page will +# contain the date or date and time when the page was generated. Setting this to +# NO can help when comparing the output of multiple runs. +# Possible values are: YES, NO, DATETIME and DATE. +# The default value is: NO. + +TIMESTAMP = NO + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, Doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If this flag is set to YES, the name of an unnamed parameter in a declaration +# will be determined by the corresponding definition. By default unnamed +# parameters remain unnamed in the output. +# The default value is: YES. + +RESOLVE_UNNAMED_PARAMS = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# will also hide undocumented C++ concepts if enabled. This option has no effect +# if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_UNDOC_NAMESPACES tag is set to YES, Doxygen will hide all +# undocumented namespaces that are normally visible in the namespace hierarchy. +# If set to NO, these namespaces will be included in the various overviews. This +# option has no effect if EXTRACT_ALL is enabled. +# The default value is: YES. + +HIDE_UNDOC_NAMESPACES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all friend +# declarations. If set to NO, these declarations will be included in the +# documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# With the correct setting of option CASE_SENSE_NAMES Doxygen will better be +# able to match the capabilities of the underlying filesystem. In case the +# filesystem is case sensitive (i.e. it supports files in the same directory +# whose names only differ in casing), the option must be set to YES to properly +# deal with such files in case they appear in the input. For filesystems that +# are not case sensitive the option should be set to NO to properly deal with +# output files written for symbols that only differ in casing, such as for two +# classes, one named CLASS and the other named Class, and to also support +# references to files without having to specify the exact matching casing. On +# Windows (including Cygwin) and macOS, users should typically set this option +# to NO, whereas on Linux or other Unix flavors it should typically be set to +# YES. +# Possible values are: SYSTEM, NO and YES. +# The default value is: SYSTEM. + +CASE_SENSE_NAMES = SYSTEM + +# If the HIDE_SCOPE_NAMES tag is set to NO then Doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then Doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class +# will show which file needs to be included to use the class. +# The default value is: YES. + +SHOW_HEADERFILE = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES then Doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then Doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then Doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then Doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then Doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and Doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING Doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# Doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by Doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by Doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents Doxygen's defaults, run Doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. See also section "Changing the +# layout of pages" for information. +# +# Note that if you run Doxygen from a directory containing a file called +# DoxygenLayout.xml, Doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +# The EXTERNAL_TOOL_PATH tag can be used to extend the search path (PATH +# environment variable) so that external tools such as latex and gs can be +# found. +# Note: Directories specified with EXTERNAL_TOOL_PATH are added in front of the +# path already specified by the PATH variable, and are added in the order +# specified. +# Note: This option is particularly useful for macOS version 14 (Sonoma) and +# higher, when running Doxygen from Doxywizard, because in this case any user- +# defined changes to the PATH are ignored. A typical example on macOS is to set +# EXTERNAL_TOOL_PATH = /Library/TeX/texbin /usr/local/bin +# together with the standard path, the full search path used by doxygen when +# launching external tools will then become +# PATH=/Library/TeX/texbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + +EXTERNAL_TOOL_PATH = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by Doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by Doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then Doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, Doxygen will generate warnings for +# potential errors in the documentation, such as documenting some parameters in +# a documented function twice, or documenting parameters that don't exist or +# using markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# If WARN_IF_INCOMPLETE_DOC is set to YES, Doxygen will warn about incomplete +# function parameter documentation. If set to NO, Doxygen will accept that some +# parameters have no documentation without warning. +# The default value is: YES. + +WARN_IF_INCOMPLETE_DOC = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, Doxygen will only warn about wrong parameter +# documentation, but not about the absence of documentation. If EXTRACT_ALL is +# set to YES then this flag will automatically be disabled. See also +# WARN_IF_INCOMPLETE_DOC +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, Doxygen will warn about +# undocumented enumeration values. If set to NO, Doxygen will accept +# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: NO. + +WARN_IF_UNDOC_ENUM_VAL = NO + +# If WARN_LAYOUT_FILE option is set to YES, Doxygen will warn about issues found +# while parsing the user defined layout file, such as missing or wrong elements. +# See also LAYOUT_FILE for details. If set to NO, problems with the layout file +# will be suppressed. +# The default value is: YES. + +WARN_LAYOUT_FILE = YES + +# If the WARN_AS_ERROR tag is set to YES then Doxygen will immediately stop when +# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS +# then Doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the Doxygen process Doxygen will return with a non-zero status. +# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then Doxygen behaves +# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined Doxygen will not +# write the warning messages in between other messages but write them at the end +# of a run, in case a WARN_LOGFILE is defined the warning messages will be +# besides being in the defined file also be shown at the end of a run, unless +# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case +# the behavior will remain as with the setting FAIL_ON_WARNINGS. +# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that Doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# See also: WARN_LINE_FORMAT +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# In the $text part of the WARN_FORMAT command it is possible that a reference +# to a more specific place is given. To make it easier to jump to this place +# (outside of Doxygen) the user can define a custom "cut" / "paste" string. +# Example: +# WARN_LINE_FORMAT = "'vi $file +$line'" +# See also: WARN_FORMAT +# The default value is: at line $line of file $file. + +WARN_LINE_FORMAT = "at line $line of file $file" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). In case the file specified cannot be opened for writing the +# warning and error messages are written to standard error. When as file - is +# specified the warning and error messages are written to standard output +# (stdout). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: +# https://www.gnu.org/software/libiconv/) for the list of possible encodings. +# See also: INPUT_FILE_ENCODING +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# This tag can be used to specify the character encoding of the source files +# that Doxygen parses. The INPUT_FILE_ENCODING tag can be used to specify +# character encoding on a per file pattern basis. Doxygen will compare the file +# name with each pattern and apply the encoding instead of the default +# INPUT_ENCODING if there is a match. The character encodings are a list of the +# form: pattern=encoding (like *.php=ISO-8859-1). +# See also: INPUT_ENCODING for further information on supported encodings. + +INPUT_FILE_ENCODING = + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by Doxygen. +# +# Note the list of default checked file patterns might differ from the list of +# default file extension mappings. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm, +# *.cpp, *.cppm, *.ccm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, +# *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d, +# *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to +# be provided as Doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cxxm \ + *.cpp \ + *.cppm \ + *.ccm \ + *.c++ \ + *.c++m \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.ixx \ + *.l \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f18 \ + *.f \ + *.for \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.ice + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which Doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# ANamespace::AClass, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that Doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that Doxygen will use the data processed and written to standard output +# for further processing, therefore nothing else, like debug statements or used +# commands (so in case of a Windows batch file always use @echo OFF), should be +# written to standard output. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by Doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by Doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the Doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +# If the IMPLICIT_DIR_DOCS tag is set to YES, any README.md file found in sub- +# directories of the project's root, is used as the documentation for that sub- +# directory, except when the README.md starts with a \dir, \page or \mainpage +# command. If set to NO, the README.md file needs to start with an explicit \dir +# command in order to be used as directory documentation. +# The default value is: YES. + +IMPLICIT_DIR_DOCS = YES + +# The Fortran standard specifies that for fixed formatted Fortran code all +# characters from position 72 are to be considered as comment. A common +# extension is to allow longer lines before the automatic comment starts. The +# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can +# be processed before the automatic comment starts. +# Minimum value: 7, maximum value: 10000, default value: 72. + +FORTRAN_COMMENT_AFTER = 72 + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# multi-line macros, enums or list initialized variables directly into the +# documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct Doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# entity all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of Doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by Doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then Doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) +# that should be ignored while generating the index headers. The IGNORE_PREFIX +# tag works for classes, function and member names. The entity will be placed in +# the alphabetical list under the first letter of the entity name that remains +# after removing the prefix. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, Doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank Doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that Doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that Doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of Doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank Doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that Doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank Doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that Doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by Doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# Note: Since the styling of scrollbars can currently not be overruled in +# Webkit/Chromium, the styling will be left out of the default doxygen.css if +# one or more extra stylesheets have been specified. So if scrollbar +# customization is desired it has to be added explicitly. For an example see the +# documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output +# should be rendered with a dark or light theme. +# Possible values are: LIGHT always generates light mode output, DARK always +# generates dark mode output, AUTO_LIGHT automatically sets the mode according +# to the user preference, uses light mode if no preference is set (the default), +# AUTO_DARK automatically sets the mode according to the user preference, uses +# dark mode if no preference is set and TOGGLE allows a user to switch between +# light and dark mode via a button. +# The default value is: AUTO_LIGHT. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE = AUTO_LIGHT + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a color-wheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use gray-scales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be +# dynamically folded and expanded in the generated HTML source code. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_CODE_FOLDING = YES + +# If the HTML_COPY_CLIPBOARD tag is set to YES then Doxygen will show an icon in +# the top right corner of code and text fragments that allows the user to copy +# its content to the clipboard. Note this only works if supported by the browser +# and the web page is served via a secure context (see: +# https://www.w3.org/TR/secure-contexts/), i.e. using the https: or file: +# protocol. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COPY_CLIPBOARD = YES + +# Doxygen stores a couple of settings persistently in the browser (via e.g. +# cookies). By default these settings apply to all HTML pages generated by +# Doxygen across all projects. The HTML_PROJECT_COOKIE tag can be used to store +# the settings under a project specific key, such that the user preferences will +# be stored separately. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_PROJECT_COOKIE = + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: +# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To +# create a documentation set, Doxygen will generate a Makefile in the HTML +# output directory. Running make will produce the docset in that directory and +# running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag determines the URL of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDURL = + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then Doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# on Windows. In the beginning of 2021 Microsoft took the original page, with +# a.o. the download links, offline (the HTML help workshop was already many +# years in maintenance mode). You can download the HTML help workshop from the +# web archives at Installation executable (see: +# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo +# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by Doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# Doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the main .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# The SITEMAP_URL tag is used to specify the full URL of the place where the +# generated documentation will be placed on the server by the user during the +# deployment of the documentation. The generated sitemap is called sitemap.xml +# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL +# is specified no sitemap is generated. For information about the sitemap +# protocol see https://www.sitemaps.org +# This tag requires that the tag GENERATE_HTML is set to YES. + +SITEMAP_URL = + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location (absolute path +# including file name) of Qt's qhelpgenerator. If non-empty Doxygen will try to +# run qhelpgenerator on the generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = YES + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine tune the look of the index (see "Fine-tuning the output"). As an +# example, the default style sheet generated by Doxygen has an example that +# shows how to put an image at the root of the tree instead of the PROJECT_NAME. +# Since the tree basically has the same information as the tab index, you could +# consider setting DISABLE_INDEX to YES when enabling this option. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the +# FULL_SIDEBAR option determines if the side bar is limited to only the treeview +# area (value NO) or if it should extend to the full height of the window (value +# YES). Setting this to YES gives a layout similar to +# https://docs.readthedocs.io with more room for contents, but less room for the +# project logo, title, and description. If either GENERATE_TREEVIEW or +# DISABLE_INDEX is set to NO, this option has no effect. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FULL_SIDEBAR = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# Doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# When the SHOW_ENUM_VALUES tag is set doxygen will show the specified +# enumeration values besides the enumeration mnemonics. +# The default value is: NO. + +SHOW_ENUM_VALUES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, Doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# If the OBFUSCATE_EMAILS tag is set to YES, Doxygen will obfuscate email +# addresses. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +OBFUSCATE_EMAILS = YES + +# If the HTML_FORMULA_FORMAT option is set to svg, Doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# Doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. +# Note that the different versions of MathJax have different requirements with +# regards to the different settings, so it is possible that also other MathJax +# settings have to be changed when switching between the different MathJax +# versions. +# Possible values are: MathJax_2 and MathJax_3. +# The default value is: MathJax_2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_VERSION = MathJax_2 + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. For more details about the output format see MathJax +# version 2 (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 +# (see: +# http://docs.mathjax.org/en/latest/web/components/output.html). +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility. This is the name for Mathjax version 2, for MathJax version 3 +# this will be translated into chtml), NativeMML (i.e. MathML. Only supported +# for MathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This +# is the name for Mathjax version 3, for MathJax version 2 this will be +# translated into HTML-CSS) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. The default value is: +# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 +# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# for MathJax version 2 (see +# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# For example for MathJax version 3 (see +# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): +# MATHJAX_EXTENSIONS = ams +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with JavaScript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled Doxygen will generate a search box for +# the HTML output. The underlying search engine uses JavaScript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the JavaScript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /